Skip to content

Commit a68e910

Browse files
committed
Migrate files from Bazaar to Git
Get original files by bzr branch lp:pypi-mirror
0 parents  commit a68e910

17 files changed

+1496
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.pyc
2+
.bzr/

CHANGES.txt

+177
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
Change history
2+
3+
1.0.16 (unreleased)
4+
-------------------
5+
6+
- added more or less sane filename detection heuristics (filename from url)
7+
- fetch-since-days is configurable now.
8+
9+
1.0.15 (20010-02-08)
10+
-------------------
11+
12+
- LP #385387: fixed issues with incompatible BeautifulSoup 3.1 version
13+
- fixed incompatiblity with new PyPI download URLs (../../packages/..)
14+
15+
1.0.14 (2009-05-29)
16+
-------------------
17+
18+
- Ignoring invalid external html pages (thanks Sridhar Ratnakumar)
19+
20+
21+
1.0.13 (2009-01-26)
22+
-------------------
23+
24+
- taking 'home_url' into account for mirroring external resources
25+
26+
27+
1.0.12 (2009-01-19)
28+
-------------------
29+
30+
- fix for Sourceforge download URLs
31+
32+
33+
1.0.11 (2009-01-14)
34+
-------------------
35+
36+
- fixed issue with broken links generated by a base_url
37+
with a trailing slash
38+
39+
1.0.10 (2008-11-25)
40+
-------------------
41+
42+
- Removing dupes from package list
43+
44+
1.0.9 (2008-11-07)
45+
------------------
46+
47+
- Display time in UTC
48+
49+
1.0.8 (2008-11-04)
50+
------------------
51+
52+
- Fixed typo in PyPI
53+
- Added a nice link for google to our project page ;)
54+
55+
1.0.7 (2008-11-03)
56+
------------------
57+
58+
- Added a footer line to index.html indicating the version and no of pkgs synced.
59+
60+
1.0.6 (2008-10-30)
61+
------------------
62+
63+
- renamed index.html to full.html
64+
- renamed index2.html to index.html
65+
66+
1.0.5 (2008-10-27)
67+
------------------
68+
69+
- disabled 'cleanup' option since it does play nicely
70+
with the --update-fetch option
71+
72+
73+
1.0.4 (2008-10-24)
74+
------------------
75+
76+
- add version number to HTTP user-agent header
77+
78+
1.0.3 (2008-10-24)
79+
------------------
80+
81+
- using fetch_url() for making HTTP requests
82+
in order to specify a dedicated user-agent header
83+
84+
1.0.2 (2008-10-24)
85+
------------------
86+
87+
- fixed packaging issues
88+
89+
1.0.1 (2008-10-24)
90+
------------------
91+
92+
- new options: --initial-fetch and --update-mode
93+
94+
1.0 (2008-10-06)
95+
----------------
96+
97+
- Release and code move to launchpad
98+
99+
100+
0.2.10 (2008-09-09)
101+
-------------------
102+
103+
- demo release for DZUG tutorial day
104+
105+
0.2.9 (2008-09-04)
106+
------------------
107+
108+
- fixed issue with logger changes in 0.2.8
109+
110+
0.2.8 (2008-09-03)
111+
------------------
112+
113+
- added highly experimental follow_external_index_pages option
114+
in order to deal with external in a better way
115+
- fetching external download files only if they match the
116+
current package name
117+
- some more logging
118+
- using TimedRotatingFileHandler for logging (rotating after one day)
119+
120+
0.2.7 (2008-09-02)
121+
------------------
122+
123+
- bahhh...forgotten pdb call :->
124+
125+
0.2.6 (2008-09-02)
126+
------------------
127+
128+
- made fetch_index() more robust
129+
130+
0.2.5 (2008-09-02)
131+
------------------
132+
133+
- fixed NameError in exception handling
134+
135+
0.2.4 (2008-08-31)
136+
------------------
137+
138+
- added logging support
139+
- minor internal cleanup
140+
- commandline options handling updated
141+
142+
0.2.3 (2008-08-29)
143+
------------------
144+
145+
- added --follow-external-links option
146+
147+
0.2.2 (2008-08-28)
148+
------------------
149+
150+
- renamed index.html to index2.html
151+
- renamed full.html to index.html
152+
- some internal cleanup
153+
154+
0.2.1 (2008-08-28)
155+
------------------
156+
157+
- ls() returns filenames in sorted order
158+
159+
0.2.0 (2008-08-28)
160+
------------------
161+
162+
- setup.py cleanup and fixes
163+
- fixed license file
164+
- updated README.txt
165+
166+
0.1.1 (2008-08-27)
167+
------------------
168+
169+
- corrected the index pages for packages (have full urls now)
170+
- added a full.html for packages (you better gz this ;) )
171+
- removed html page download for external sites
172+
173+
174+
0.1.0 (2008-08-27)
175+
------------------
176+
177+
- initial release

MANIFEST.in

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
include *.txt
2+
recursive-include src *.txt *.py *.zcml *.sample
3+
include docs/*.txt

README.txt

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Setting up a PyPI "simple" index
2+
================================
3+
4+
This package provides a mirror for the PyPI simple interface,
5+
http://cheeseshop.python.org/simple/.
6+
7+
To set up a mirror:
8+
9+
- install this package using setuptools (easy_install, buildout, etc.)
10+
so that the script, pypimirror script is installed.
11+
12+
- create your mirror configuration file maybe based on config.cfg.sample
13+
14+
- Run the pypimirror script passing the name of the mirror configuration
15+
file
16+
17+
This will initialize the mirror.
18+
19+
- Set up a cron job to run update-mirror periodically.
20+
21+
22+
LICENSE
23+
=======
24+
Zope Public License 2.1 (ZPL 2.1)
25+
26+
Authors
27+
=======
28+
z3c.pypimirror took place at the Blackforest Sprint 2008 and involved the
29+
the following persons:
30+
31+
- Daniel Kraft (Lead)
32+
- Gottfried Ganssauge
33+
- Josip Delic
34+
- Andreas Jung
35+

TODO.txt

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
- implement a parallel package fetcher using 'processing':
2+
http://pyprocessing.berlios.de/doc/pool-objects.html
3+
4+
- implement a blacklist for unreachable or broken external
5+
links

ZPL.txt

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
Zope Public License (ZPL) Version 2.1
2+
3+
A copyright notice accompanies this license document that
4+
identifies the copyright holders.
5+
6+
This license has been certified as open source. It has also
7+
been designated as GPL compatible by the Free Software
8+
Foundation (FSF).
9+
10+
Redistribution and use in source and binary forms, with or
11+
without modification, are permitted provided that the
12+
following conditions are met:
13+
14+
1. Redistributions in source code must retain the
15+
accompanying copyright notice, this list of conditions,
16+
and the following disclaimer.
17+
18+
2. Redistributions in binary form must reproduce the accompanying
19+
copyright notice, this list of conditions, and the
20+
following disclaimer in the documentation and/or other
21+
materials provided with the distribution.
22+
23+
3. Names of the copyright holders must not be used to
24+
endorse or promote products derived from this software
25+
without prior written permission from the copyright
26+
holders.
27+
28+
4. The right to distribute this software or to use it for
29+
any purpose does not give you the right to use
30+
Servicemarks (sm) or Trademarks (tm) of the copyright
31+
holders. Use of them is covered by separate agreement
32+
with the copyright holders.
33+
34+
5. If any files are modified, you must cause the modified
35+
files to carry prominent notices stating that you changed
36+
the files and the date of any change.
37+
38+
Disclaimer
39+
40+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS''
41+
AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
42+
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
43+
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
44+
NO EVENT SHALL THE COPYRIGHT HOLDERS BE
45+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
46+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
47+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
48+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
49+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
50+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
51+
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
52+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
53+
DAMAGE.
54+

bootstrap.py

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
##############################################################################
2+
#
3+
# Copyright (c) 2006 Zope Corporation and Contributors.
4+
# All Rights Reserved.
5+
#
6+
# This software is subject to the provisions of the Zope Public License,
7+
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
8+
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
9+
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
10+
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
11+
# FOR A PARTICULAR PURPOSE.
12+
#
13+
##############################################################################
14+
"""Bootstrap a buildout-based project
15+
16+
Simply run this script in a directory containing a buildout.cfg.
17+
The script accepts buildout command-line options, so you can
18+
use the -c option to specify an alternate configuration file.
19+
20+
$Id: bootstrap.py 78032 2007-07-16 14:26:49Z jim $
21+
"""
22+
23+
import os, shutil, sys, tempfile, urllib2
24+
25+
tmpeggs = tempfile.mkdtemp()
26+
27+
try:
28+
import pkg_resources
29+
except ImportError:
30+
ez = {}
31+
exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
32+
).read() in ez
33+
ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
34+
35+
import pkg_resources
36+
37+
cmd = 'from setuptools.command.easy_install import main; main()'
38+
if sys.platform == 'win32':
39+
cmd = '"%s"' % cmd # work around spawn lamosity on windows
40+
41+
ws = pkg_resources.working_set
42+
assert os.spawnle(
43+
os.P_WAIT, sys.executable, sys.executable,
44+
'-c', cmd, '-mqNxd', tmpeggs, 'zc.buildout',
45+
dict(os.environ,
46+
PYTHONPATH=
47+
ws.find(pkg_resources.Requirement.parse('setuptools')).location
48+
),
49+
) == 0
50+
51+
ws.add_entry(tmpeggs)
52+
ws.require('zc.buildout')
53+
import zc.buildout.buildout
54+
zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap'])
55+
shutil.rmtree(tmpeggs)

buildout.cfg

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[buildout]
2+
parts = py test
3+
develop = .
4+
5+
[py]
6+
recipe = zc.recipe.egg
7+
eggs = z3c.pypimirror
8+
interpreter = py
9+
10+
[test]
11+
recipe = zc.recipe.testrunner
12+
eggs = z3c.pypimirror[test]

setup.py

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
from setuptools import setup, find_packages
2+
3+
4+
CLASSIFIERS = [
5+
'Development Status :: 5 - Production/Stable',
6+
'Intended Audience :: Developers',
7+
'License :: OSI Approved :: Zope Public License',
8+
'Operating System :: OS Independent',
9+
'Programming Language :: Python',
10+
]
11+
12+
desc = open('README.txt').read().strip()
13+
changes = open('CHANGES.txt').read().strip()
14+
long_description = desc + '\n\nChanges\n=======\n\n' + changes
15+
16+
setup(
17+
name='z3c.pypimirror',
18+
version = '1.0.15.1',
19+
author='Daniel Kraft, Andreas Jung et al.',
20+
author_email='[email protected]',
21+
description='A module for building a complete or a partial PyPI mirror',
22+
long_description=long_description,
23+
maintainer='Andreas Jung',
24+
maintainer_email='[email protected]',
25+
classifiers=CLASSIFIERS,
26+
package_dir = {'': 'src'},
27+
namespace_packages=['z3c'] ,
28+
packages=find_packages('src'),
29+
include_package_data=True,
30+
package_data={
31+
'' : ['*.txt', '*.sample'],
32+
},
33+
zip_safe=False,
34+
install_requires = ['setuptools',
35+
'zc.lockfile',
36+
'BeautifulSoup<=3.0.9999'],
37+
extras_require = {
38+
'test': [ 'zc.buildout',
39+
'zope.testing',
40+
'interlude' ],
41+
},
42+
entry_points = dict(console_scripts=[
43+
'pypimirror = z3c.pypimirror.mirror:run',
44+
])
45+
)

src/z3c/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# namespace package boilerplate
2+
__import__('pkg_resources').declare_namespace(__name__)

0 commit comments

Comments
 (0)