Merge lp:~barry/ubuntu/lucid/distribute/sync-to-sid into lp:ubuntu/lucid/distribute

Proposed by Barry Warsaw
Status: Merged
Merge reported by: Benjamin Drung
Merged at revision: not available
Proposed branch: lp:~barry/ubuntu/lucid/distribute/sync-to-sid
Merge into: lp:ubuntu/lucid/distribute
Diff against target: 2722 lines (+539/-1442)
37 files modified
CHANGES.txt (+35/-0)
CONTRIBUTORS.txt (+2/-0)
PKG-INFO (+68/-21)
README.txt (+41/-29)
debian/changelog (+20/-0)
debian/control (+2/-2)
debian/python-distribute.substvars (+1/-1)
debian/rules (+6/-8)
distribute.egg-info/PKG-INFO (+68/-21)
distribute.egg-info/SOURCES.txt (+3/-4)
distribute.egg-info/entry_points.txt (+1/-1)
distribute_setup.py (+34/-16)
distribute_setup_dev.py (+0/-458)
docs/_templates/indexsidebar.html (+8/-0)
docs/build/html/_sources/easy_install.txt (+5/-2)
docs/build/html/_sources/index.txt (+17/-1)
docs/build/html/_sources/pkg_resources.txt (+4/-3)
docs/build/html/_sources/roadmap.txt (+2/-2)
docs/conf.py (+4/-3)
docs/easy_install.txt (+5/-2)
docs/index.txt (+17/-1)
docs/pkg_resources.txt (+4/-3)
docs/roadmap.txt (+2/-2)
ll.txt (+0/-37)
ok.txt (+0/-804)
pkg_resources.py (+22/-3)
setup.py (+4/-2)
setuptools/command/__init__.py (+3/-0)
setuptools/command/easy_install.py (+7/-1)
setuptools/command/install_scripts.py (+4/-1)
setuptools/command/upload_docs.py (+1/-1)
setuptools/sandbox.py (+6/-2)
setuptools/tests/test_develop.py (+1/-1)
setuptools/tests/test_easy_install.py (+39/-1)
setuptools/tests/test_resources.py (+10/-9)
setuptools/tests/test_sandbox.py (+28/-0)
setuptools/tests/test_upload_docs.py (+65/-0)
To merge this branch: bzr merge lp:~barry/ubuntu/lucid/distribute/sync-to-sid
Reviewer Review Type Date Requested Status
Scott Kitterman Needs Fixing
Ubuntu branches Pending
Review via email: mp+17425@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Barry Warsaw (barry) wrote :

Sync'd via 'bzr merge-package' to lp:debian/sid/distribute. This should give us python-distribute 0.6.10 in Lucid, the latest upstream version.

Revision history for this message
Barry Warsaw (barry) wrote :
Revision history for this message
Scott Kitterman (kitterman) wrote :

Needs some cleanup as discussed on IRC.

review: Needs Fixing
9. By Barry Warsaw

Stop building for Python 2.5 as per discussion with ScottK.

10. By Barry Warsaw

Remove another reference to Python 2.5

Revision history for this message
Barry Warsaw (barry) wrote :

As per IRC, removed references to building for Python 2.5.

New diff against sid: http://paste.ubuntu.com/358715/
New diff against lucid: http://paste.ubuntu.com/358716/

Revision history for this message
Scott Kitterman (kitterman) wrote :

The diff looks good. For debian/changelog, we want an entry that looks something like:

  * Merge from Debian Unstable. Remaining Ubuntu changes:
    - Document each item of the diff here so it's clear where we
      diverge from Debian and why
    - Adjust debian/rules to only build modules and extensions for Python 2.6
      instead of Python 2.4/2.5 (or whatever needs describing)

If I didn't know you really wanted to learn this stuff, I'd probably just fix it an upload, but since you do ....

review: Needs Fixing
11. By Barry Warsaw

* Merge from Debian Unstable. Remaining Ubuntu changes:
  - Build only for Python 2.6, since 2.5 and earlier is not supported on
    Lucid.
  - Remove old setuptools.egg-info directories so that we can transition
    to symlinks.
  - When writing the debian/python-setuptools.substvars, only include
    variable substitutions for building Python 2.6.

Revision history for this message
Barry Warsaw (barry) wrote :

I'm not 100% positive I understand what the .substvars files are for, where they're used, or why this rules file is writing them. However, it seems clear that we only want to support Python 2.6. Here is the updated changelog (branch update pushed in r11.

distribute (0.6.10-1ubuntu1) lucid; urgency=low

  * Merge from Debian Unstable. Remaining Ubuntu changes:
    - Build only for Python 2.6, since 2.5 and earlier is not supported on
      Lucid.
    - Remove old setuptools.egg-info directories so that we can transition
      to symlinks.
    - When writing the debian/python-setuptools.substvars, only include
      variable substitutions for building Python 2.6.

 -- Barry Warsaw <email address hidden> Thu, 14 Jan 2010 16:55:50 -0500

Revision history for this message
Michael Bienia (geser) wrote :

FYI: distribute 0.6.10-1ubuntu1 (different to this merge proposal) got uploaded to lucid.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CHANGES.txt'
2--- CHANGES.txt 2009-11-12 02:12:16 +0000
3+++ CHANGES.txt 2010-01-19 00:05:23 +0000
4@@ -2,6 +2,41 @@
5 CHANGES
6 =======
7
8+------
9+0.6.10
10+------
11+
12+* Reverted change made for the DistributionNotFound exception because
13+ zc.buildout uses the exception message to get the name of the
14+ distribution.
15+
16+-----
17+0.6.9
18+-----
19+
20+* Issue 90: unknown setuptools version can be added in the working set
21+* Issue 87: setupt.py doesn't try to convert distribute_setup.py anymore
22+ Initial Patch by arfrever.
23+* Issue 89: added a side bar with a download link to the doc.
24+* Issue 86: fixed missing sentence in pkg_resources doc.
25+* Added a nicer error message when a DistributionNotFound is raised.
26+* Issue 80: test_develop now works with Python 3.1
27+* Issue 93: upload_docs now works if there is an empty sub-directory.
28+* Issue 70: exec bit on non-exec files
29+* Issue 99: now the standalone easy_install command doesn't uses a
30+ "setup.cfg" if any exists in the working directory. It will use it
31+ only if triggered by ``install_requires`` from a setup.py call
32+ (install, develop, etc).
33+* Issue 101: Allowing ``os.devnull`` in Sandbox
34+* Issue 92: Fixed the "no eggs" found error with MacPort
35+ (platform.mac_ver() fails)
36+* Issue 103: test_get_script_header_jython_workaround not run
37+ anymore under py3 with C or POSIX local. Contributed by Arfrever.
38+* Issue 104: remvoved the assertion when the installation fails,
39+ with a nicer message for the end user.
40+* Issue 100: making sure there's no SandboxViolation when
41+ the setup script patches setuptools.
42+
43 -----
44 0.6.8
45 -----
46
47=== modified file 'CONTRIBUTORS.txt'
48--- CONTRIBUTORS.txt 2009-11-12 02:12:16 +0000
49+++ CONTRIBUTORS.txt 2010-01-19 00:05:23 +0000
50@@ -3,6 +3,8 @@
51 ============
52
53 * Alex Grönholm
54+* Alice Bevan-McGregor
55+* Arfrever Frehtes Taifersar Arahesis
56 * Daniel Stutzbach
57 * Hanno Schlichting
58 * Jannis Leidel
59
60=== modified file 'PKG-INFO'
61--- PKG-INFO 2009-11-12 02:12:16 +0000
62+++ PKG-INFO 2010-01-19 00:05:23 +0000
63@@ -1,6 +1,6 @@
64 Metadata-Version: 1.0
65 Name: distribute
66-Version: 0.6.8
67+Version: 0.6.10
68 Summary: Easily download, build, install, upgrade, and uninstall Python packages
69 Home-page: http://packages.python.org/distribute
70 Author: The fellowship of the packaging
71@@ -115,9 +115,9 @@
72
73 Download the source tarball, uncompress it, then run the install command::
74
75- $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.8.tar.gz
76- $ tar -xzvf distribute-0.6.8.tar.gz
77- $ cd distribute-0.6.8
78+ $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.10.tar.gz
79+ $ tar -xzvf distribute-0.6.10.tar.gz
80+ $ cd distribute-0.6.10
81 $ python setup.py install
82
83 ---------------------------
84@@ -157,15 +157,25 @@
85 Quick help for developers
86 -------------------------
87
88- To use Distribute in your package, the recommended way is to ship
89- `distribute_setup.py` alongside your `setup.py` script and call
90- it at the very begining of `setup.py` like this::
91-
92- from distribute_setup import use_setuptools
93- use_setuptools()
94-
95-
96- Another way is to add ``Distribute`` in the ``install_requires`` option::
97+ To create an egg which is compatible with Distribute, use the same
98+ practice as with Setuptools, e.g.::
99+
100+ from setuptools import setup
101+
102+ setup(...
103+ )
104+
105+ To use `pkg_resources` to access data files in the egg, you should
106+ require the Setuptools distribution explicitly::
107+
108+ from setuptools import setup
109+
110+ setup(...
111+ install_requires=['setuptools']
112+ )
113+
114+ Only if you need Distribute-specific functionality should you depend
115+ on it explicitly. In this case, replace the Setuptools dependency::
116
117 from setuptools import setup
118
119@@ -177,14 +187,16 @@
120 Install FAQ
121 -----------
122
123- - **Why Distribute turn my Setuptools installation into an fake one?**
124-
125- Since Distribute is a fork, and since it provides the same package and modules,
126- it fakes that the Setuptools installation is still present, so all the programs
127- that where using Setuptools still work.
128-
129- If it wasn't doing it, a program that would try to install Setuptools
130- would overwrite in turn Distribute.
131+ - **Why is Distribute wrapping my Setuptools installation?**
132+
133+ Since Distribute is a fork, and since it provides the same package
134+ and modules, it renames the existing Setuptools egg and inserts a
135+ new one which merely wraps the Distribute code. This way, full
136+ backwards compatibility is kept for packages which rely on the
137+ Setuptools modules.
138+
139+ At the same time, packages can meet their dependency on Setuptools
140+ without actually installing it (which would disable Distribute).
141
142 - **How does Distribute interact with virtualenv?**
143
144@@ -236,6 +248,41 @@
145 CHANGES
146 =======
147
148+ ------
149+ 0.6.10
150+ ------
151+
152+ * Reverted change made for the DistributionNotFound exception because
153+ zc.buildout uses the exception message to get the name of the
154+ distribution.
155+
156+ -----
157+ 0.6.9
158+ -----
159+
160+ * Issue 90: unknown setuptools version can be added in the working set
161+ * Issue 87: setupt.py doesn't try to convert distribute_setup.py anymore
162+ Initial Patch by arfrever.
163+ * Issue 89: added a side bar with a download link to the doc.
164+ * Issue 86: fixed missing sentence in pkg_resources doc.
165+ * Added a nicer error message when a DistributionNotFound is raised.
166+ * Issue 80: test_develop now works with Python 3.1
167+ * Issue 93: upload_docs now works if there is an empty sub-directory.
168+ * Issue 70: exec bit on non-exec files
169+ * Issue 99: now the standalone easy_install command doesn't uses a
170+ "setup.cfg" if any exists in the working directory. It will use it
171+ only if triggered by ``install_requires`` from a setup.py call
172+ (install, develop, etc).
173+ * Issue 101: Allowing ``os.devnull`` in Sandbox
174+ * Issue 92: Fixed the "no eggs" found error with MacPort
175+ (platform.mac_ver() fails)
176+ * Issue 103: test_get_script_header_jython_workaround not run
177+ anymore under py3 with C or POSIX local. Contributed by Arfrever.
178+ * Issue 104: remvoved the assertion when the installation fails,
179+ with a nicer message for the end user.
180+ * Issue 100: making sure there's no SandboxViolation when
181+ the setup script patches setuptools.
182+
183 -----
184 0.6.8
185 -----
186
187=== modified file 'README.txt'
188--- README.txt 2009-11-12 02:12:16 +0000
189+++ README.txt 2010-01-19 00:05:23 +0000
190@@ -29,7 +29,7 @@
191 the same as for Python 2 code, but Distribute also helps you to support
192 Python 2 and Python 3 from the same source code by letting you run 2to3
193 on the code as a part of the build process, by setting the keyword parameter
194- ``use_2to3`` to True. See http://packages.python.org/distribute for more
195+ ``use_2to3`` to True. See http://packages.python.org/distribute for more
196 information.
197
198 - Refactoring the code, and releasing it in several distributions.
199@@ -45,7 +45,7 @@
200 ==================
201
202 You can get more information in the Sphinx-based documentation, located
203-at http://packages.python.org/distribute. This documentation includes the old
204+at http://packages.python.org/distribute. This documentation includes the old
205 Setuptools documentation that is slowly replaced, and brand new content.
206
207 About the installation process
208@@ -107,9 +107,9 @@
209
210 Download the source tarball, uncompress it, then run the install command::
211
212- $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.8.tar.gz
213- $ tar -xzvf distribute-0.6.8.tar.gz
214- $ cd distribute-0.6.8
215+ $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.10.tar.gz
216+ $ tar -xzvf distribute-0.6.10.tar.gz
217+ $ cd distribute-0.6.10
218 $ python setup.py install
219
220 ---------------------------
221@@ -117,7 +117,7 @@
222 ---------------------------
223
224 Like other distutils-based distributions, Distribute doesn't provide an
225-uninstaller yet. It's all done manually! We are all waiting for PEP 376
226+uninstaller yet. It's all done manually! We are all waiting for PEP 376
227 support in Python.
228
229 Distribute is installed in three steps:
230@@ -149,34 +149,46 @@
231 Quick help for developers
232 -------------------------
233
234-To use Distribute in your package, the recommended way is to ship
235-`distribute_setup.py` alongside your `setup.py` script and call
236-it at the very begining of `setup.py` like this::
237-
238- from distribute_setup import use_setuptools
239- use_setuptools()
240-
241-
242-Another way is to add ``Distribute`` in the ``install_requires`` option::
243-
244- from setuptools import setup
245-
246- setup(...
247- install_requires=['distribute']
248+To create an egg which is compatible with Distribute, use the same
249+practice as with Setuptools, e.g.::
250+
251+ from setuptools import setup
252+
253+ setup(...
254+ )
255+
256+To use `pkg_resources` to access data files in the egg, you should
257+require the Setuptools distribution explicitly::
258+
259+ from setuptools import setup
260+
261+ setup(...
262+ install_requires=['setuptools']
263+ )
264+
265+Only if you need Distribute-specific functionality should you depend
266+on it explicitly. In this case, replace the Setuptools dependency::
267+
268+ from setuptools import setup
269+
270+ setup(...
271+ install_requires=['distribute']
272 )
273
274 -----------
275 Install FAQ
276 -----------
277
278-- **Why Distribute turn my Setuptools installation into an fake one?**
279-
280- Since Distribute is a fork, and since it provides the same package and modules,
281- it fakes that the Setuptools installation is still present, so all the programs
282- that where using Setuptools still work.
283-
284- If it wasn't doing it, a program that would try to install Setuptools
285- would overwrite in turn Distribute.
286+- **Why is Distribute wrapping my Setuptools installation?**
287+
288+ Since Distribute is a fork, and since it provides the same package
289+ and modules, it renames the existing Setuptools egg and inserts a
290+ new one which merely wraps the Distribute code. This way, full
291+ backwards compatibility is kept for packages which rely on the
292+ Setuptools modules.
293+
294+ At the same time, packages can meet their dependency on Setuptools
295+ without actually installing it (which would disable Distribute).
296
297 - **How does Distribute interact with virtualenv?**
298
299@@ -190,7 +202,7 @@
300 and if the virtualenv you are in was generated without the `--no-site-packages`
301 option, the Distribute installation will stop.
302
303- You need in this case to build a virtualenv with the `--no-site-packages`
304+ You need in this case to build a virtualenv with the `--no-site-packages`
305 option or to install `Distribute` globally.
306
307 - **How does Distribute interacts with zc.buildout?**
308
309=== modified file 'debian/changelog'
310--- debian/changelog 2009-12-05 13:20:47 +0000
311+++ debian/changelog 2010-01-19 00:05:23 +0000
312@@ -1,3 +1,22 @@
313+distribute (0.6.10-1ubuntu1) lucid; urgency=low
314+
315+ * Merge from Debian Unstable. Remaining Ubuntu changes:
316+ - Build only for Python 2.6, since 2.5 and earlier is not supported on
317+ Lucid.
318+ - Remove old setuptools.egg-info directories so that we can transition
319+ to symlinks.
320+ - When writing the debian/python-setuptools.substvars, only include
321+ variable substitutions for building Python 2.6.
322+
323+ -- Barry Warsaw <barry@canonical.com> Thu, 14 Jan 2010 16:55:50 -0500
324+
325+distribute (0.6.10-1) unstable; urgency=low
326+
327+ * New upstream version.
328+ * Stop building for python2.4. Closes: #557000.
329+
330+ -- Matthias Klose <doko@debian.org> Mon, 28 Dec 2009 23:52:40 +0100
331+
332 distribute (0.6.8-1ubuntu2) lucid; urgency=low
333
334 * python-setuptools.preinst (lp: #490731):
335@@ -14,6 +33,7 @@
336 distribute (0.6.8-1) unstable; urgency=low
337
338 * New upstream version.
339+ * Stop building for python2.4. Closes: #557000.
340
341 -- Matthias Klose <doko@debian.org> Thu, 12 Nov 2009 02:12:16 +0100
342
343
344=== modified file 'debian/control'
345--- debian/control 2009-12-05 13:20:47 +0000
346+++ debian/control 2010-01-19 00:05:23 +0000
347@@ -4,9 +4,9 @@
348 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
349 XSBC-Original-Maintainer: Matthias Klose <doko@debian.org>
350 #Build-Depends-Indep: python-all-dev, python2.5-dev, python2.6-dev, python3-all-dev, python-central (>= 0.6.11), python-sphinx
351-Build-Depends-Indep: python2.5-dev, python-all-dev, python-central (>= 0.6.11), python-sphinx
352+Build-Depends-Indep: python-all-dev, python-central (>= 0.6.11), python-sphinx
353 Build-Depends: debhelper (>= 5.0.37.1)
354-XS-Python-Version: 2.4, 2.5, 2.6
355+XS-Python-Version: 2.6
356 Standards-Version: 3.8.3
357 Homepage: http://packages.python.org/distribute
358
359
360=== modified file 'debian/python-distribute.substvars'
361--- debian/python-distribute.substvars 2009-11-12 02:17:43 +0000
362+++ debian/python-distribute.substvars 2010-01-19 00:05:23 +0000
363@@ -1,2 +1,2 @@
364-python:Versions=2.4, 2.4, 2.5, 2.6, 2.5, 2.6
365+python:Versions=2.4, 2.5, 2.5, 2.6, 2.6
366 python:Provides=python2.4-distribute, python2.5-distribute
367
368=== modified file 'debian/rules'
369--- debian/rules 2009-11-12 02:17:43 +0000
370+++ debian/rules 2010-01-19 00:05:23 +0000
371@@ -19,12 +19,10 @@
372 # setuptools doesn't handle translated messages
373 export LC_ALL=C
374
375-PYVERS := 2.3 2.5 $(shell pyversions -vr debian/control)
376-XPYVERS := 2.6 2.5
377-PYVERS := 2.4 2.5
378-PYVERS := 2.6
379+PYVERS := $(shell pyversions -vr debian/control)
380+XPYVERS := 2.6
381 PYVER := $(shell python -c 'import sys; print sys.version[:3]')
382-SETUPTOOLSVER=0.6c9
383+SETUPTOOLSVER=0.6c11
384 export XPYVERS
385
386 include /usr/share/python/python.mk
387@@ -161,9 +159,9 @@
388
389 cat $(d_setp).substvars
390 ( \
391- echo 'python:Versions=2.4, 2.5, 2.6'; \
392- echo 'python:Provides=python2.4-setuptools, python2.5-setuptools, python2.6-setuptools'; \
393- echo 'python:Depends=python (>= 2.4), python (<< 2.7), python-central (>= 0.6.11)'; \
394+ echo 'python:Versions=2.6'; \
395+ echo 'python:Provides=python2.6-setuptools'; \
396+ echo 'python:Depends=python (>= 2.6), python (<< 2.7), python-central (>= 0.6.11)'; \
397 ) > $(d_setp).substvars
398 cat $(d_setp).substvars
399 # cp $(d_setp).substvars $(d_dist).substvars
400
401=== modified file 'distribute.egg-info/PKG-INFO'
402--- distribute.egg-info/PKG-INFO 2009-11-12 02:12:16 +0000
403+++ distribute.egg-info/PKG-INFO 2010-01-19 00:05:23 +0000
404@@ -1,6 +1,6 @@
405 Metadata-Version: 1.0
406 Name: distribute
407-Version: 0.6.8
408+Version: 0.6.10
409 Summary: Easily download, build, install, upgrade, and uninstall Python packages
410 Home-page: http://packages.python.org/distribute
411 Author: The fellowship of the packaging
412@@ -115,9 +115,9 @@
413
414 Download the source tarball, uncompress it, then run the install command::
415
416- $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.8.tar.gz
417- $ tar -xzvf distribute-0.6.8.tar.gz
418- $ cd distribute-0.6.8
419+ $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.10.tar.gz
420+ $ tar -xzvf distribute-0.6.10.tar.gz
421+ $ cd distribute-0.6.10
422 $ python setup.py install
423
424 ---------------------------
425@@ -157,15 +157,25 @@
426 Quick help for developers
427 -------------------------
428
429- To use Distribute in your package, the recommended way is to ship
430- `distribute_setup.py` alongside your `setup.py` script and call
431- it at the very begining of `setup.py` like this::
432-
433- from distribute_setup import use_setuptools
434- use_setuptools()
435-
436-
437- Another way is to add ``Distribute`` in the ``install_requires`` option::
438+ To create an egg which is compatible with Distribute, use the same
439+ practice as with Setuptools, e.g.::
440+
441+ from setuptools import setup
442+
443+ setup(...
444+ )
445+
446+ To use `pkg_resources` to access data files in the egg, you should
447+ require the Setuptools distribution explicitly::
448+
449+ from setuptools import setup
450+
451+ setup(...
452+ install_requires=['setuptools']
453+ )
454+
455+ Only if you need Distribute-specific functionality should you depend
456+ on it explicitly. In this case, replace the Setuptools dependency::
457
458 from setuptools import setup
459
460@@ -177,14 +187,16 @@
461 Install FAQ
462 -----------
463
464- - **Why Distribute turn my Setuptools installation into an fake one?**
465-
466- Since Distribute is a fork, and since it provides the same package and modules,
467- it fakes that the Setuptools installation is still present, so all the programs
468- that where using Setuptools still work.
469-
470- If it wasn't doing it, a program that would try to install Setuptools
471- would overwrite in turn Distribute.
472+ - **Why is Distribute wrapping my Setuptools installation?**
473+
474+ Since Distribute is a fork, and since it provides the same package
475+ and modules, it renames the existing Setuptools egg and inserts a
476+ new one which merely wraps the Distribute code. This way, full
477+ backwards compatibility is kept for packages which rely on the
478+ Setuptools modules.
479+
480+ At the same time, packages can meet their dependency on Setuptools
481+ without actually installing it (which would disable Distribute).
482
483 - **How does Distribute interact with virtualenv?**
484
485@@ -236,6 +248,41 @@
486 CHANGES
487 =======
488
489+ ------
490+ 0.6.10
491+ ------
492+
493+ * Reverted change made for the DistributionNotFound exception because
494+ zc.buildout uses the exception message to get the name of the
495+ distribution.
496+
497+ -----
498+ 0.6.9
499+ -----
500+
501+ * Issue 90: unknown setuptools version can be added in the working set
502+ * Issue 87: setupt.py doesn't try to convert distribute_setup.py anymore
503+ Initial Patch by arfrever.
504+ * Issue 89: added a side bar with a download link to the doc.
505+ * Issue 86: fixed missing sentence in pkg_resources doc.
506+ * Added a nicer error message when a DistributionNotFound is raised.
507+ * Issue 80: test_develop now works with Python 3.1
508+ * Issue 93: upload_docs now works if there is an empty sub-directory.
509+ * Issue 70: exec bit on non-exec files
510+ * Issue 99: now the standalone easy_install command doesn't uses a
511+ "setup.cfg" if any exists in the working directory. It will use it
512+ only if triggered by ``install_requires`` from a setup.py call
513+ (install, develop, etc).
514+ * Issue 101: Allowing ``os.devnull`` in Sandbox
515+ * Issue 92: Fixed the "no eggs" found error with MacPort
516+ (platform.mac_ver() fails)
517+ * Issue 103: test_get_script_header_jython_workaround not run
518+ anymore under py3 with C or POSIX local. Contributed by Arfrever.
519+ * Issue 104: remvoved the assertion when the installation fails,
520+ with a nicer message for the end user.
521+ * Issue 100: making sure there's no SandboxViolation when
522+ the setup script patches setuptools.
523+
524 -----
525 0.6.8
526 -----
527
528=== modified file 'distribute.egg-info/SOURCES.txt'
529--- distribute.egg-info/SOURCES.txt 2009-11-12 02:12:16 +0000
530+++ distribute.egg-info/SOURCES.txt 2010-01-19 00:05:23 +0000
531@@ -4,11 +4,8 @@
532 MANIFEST.in
533 README.txt
534 distribute_setup.py
535-distribute_setup_dev.py
536 easy_install.py
537 launcher.c
538-ll.txt
539-ok.txt
540 pkg_resources.py
541 setup.cfg
542 setup.py
543@@ -39,7 +36,7 @@
544 docs/build/html/_sources/setuptools.txt
545 docs/build/html/_sources/using.txt
546 docs/build/html/_static/basic.css
547-docs/build/html/_static/default.css
548+docs/build/html/_static/nature.css
549 docs/build/html/_static/pygments.css
550 setuptools/__init__.py
551 setuptools/archive_util.py
552@@ -79,6 +76,8 @@
553 setuptools/tests/test_easy_install.py
554 setuptools/tests/test_packageindex.py
555 setuptools/tests/test_resources.py
556+setuptools/tests/test_sandbox.py
557+setuptools/tests/test_upload_docs.py
558 setuptools/tests/win_script_wrapper.txt
559 tests/api_tests.txt
560 tests/install_test.py
561
562=== modified file 'distribute.egg-info/entry_points.txt'
563--- distribute.egg-info/entry_points.txt 2009-10-20 00:12:26 +0000
564+++ distribute.egg-info/entry_points.txt 2010-01-19 00:05:23 +0000
565@@ -33,7 +33,6 @@
566 [console_scripts]
567 easy_install = setuptools.command.easy_install:main
568 easy_install-2.5 = setuptools.command.easy_install:main
569-easy_install-2.4 = setuptools.command.easy_install:main
570 easy_install-2.6 = setuptools.command.easy_install:main
571
572 [setuptools.file_finders]
573@@ -54,6 +53,7 @@
574 eager_resources = setuptools.dist:assert_string_list
575 zip_safe = setuptools.dist:assert_bool
576 test_loader = setuptools.dist:check_importable
577+packages = setuptools.dist:check_packages
578 convert_2to3_doctests = setuptools.dist:assert_string_list
579 tests_require = setuptools.dist:check_requirements
580
581
582=== modified file 'distribute_setup.py'
583--- distribute_setup.py 2009-11-12 02:12:16 +0000
584+++ distribute_setup.py 2010-01-19 00:05:23 +0000
585@@ -46,19 +46,21 @@
586 args = [quote(arg) for arg in args]
587 return os.spawnl(os.P_WAIT, sys.executable, *args) == 0
588
589-DEFAULT_VERSION = "0.6.8"
590+DEFAULT_VERSION = "0.6.10"
591 DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/"
592+SETUPTOOLS_FAKED_VERSION = "0.6c11"
593+
594 SETUPTOOLS_PKG_INFO = """\
595 Metadata-Version: 1.0
596 Name: setuptools
597-Version: 0.6c9
598+Version: %s
599 Summary: xxxx
600 Home-page: xxx
601 Author: xxx
602 Author-email: xxx
603 License: xxx
604 Description: xxx
605-"""
606+""" % SETUPTOOLS_FAKED_VERSION
607
608
609 def _install(tarball):
610@@ -79,7 +81,9 @@
611
612 # installing
613 log.warn('Installing Distribute')
614- assert _python_cmd('setup.py', 'install')
615+ if not _python_cmd('setup.py', 'install'):
616+ log.warn('Something went wrong during the installation.')
617+ log.warn('See the error message above.')
618 finally:
619 os.chdir(old_wd)
620
621@@ -220,22 +224,34 @@
622 def _same_content(path, content):
623 return open(path).read() == content
624
625-
626+def _no_sandbox(function):
627+ def __no_sandbox(*args, **kw):
628+ try:
629+ from setuptools.sandbox import DirectorySandbox
630+ def violation(*args):
631+ pass
632+ DirectorySandbox._old = DirectorySandbox._violation
633+ DirectorySandbox._violation = violation
634+ patched = True
635+ except ImportError:
636+ patched = False
637+
638+ try:
639+ return function(*args, **kw)
640+ finally:
641+ if patched:
642+ DirectorySandbox._violation = DirectorySandbox._old
643+ del DirectorySandbox._old
644+
645+ return __no_sandbox
646+
647+@_no_sandbox
648 def _rename_path(path):
649 new_name = path + '.OLD.%s' % time.time()
650 log.warn('Renaming %s into %s', path, new_name)
651- try:
652- from setuptools.sandbox import DirectorySandbox
653- def _violation(*args):
654- pass
655- DirectorySandbox._violation = _violation
656- except ImportError:
657- pass
658-
659 os.rename(path, new_name)
660 return new_name
661
662-
663 def _remove_flat_installation(placeholder):
664 if not os.path.isdir(placeholder):
665 log.warn('Unkown installation at %s', placeholder)
666@@ -275,22 +291,25 @@
667 placeholder = dist.get_command_obj('install').install_purelib
668 _create_fake_setuptools_pkg_info(placeholder)
669
670+@_no_sandbox
671 def _create_fake_setuptools_pkg_info(placeholder):
672 if not placeholder or not os.path.exists(placeholder):
673 log.warn('Could not find the install location')
674 return
675 pyver = '%s.%s' % (sys.version_info[0], sys.version_info[1])
676- setuptools_file = 'setuptools-0.6c9.egg-info'
677+ setuptools_file = 'setuptools-%s.egg-info' % SETUPTOOLS_FAKED_VERSION
678 pkg_info = os.path.join(placeholder, setuptools_file)
679 if os.path.exists(pkg_info):
680 log.warn('%s already exists', pkg_info)
681 return
682+
683 log.warn('Creating %s', pkg_info)
684 f = open(pkg_info, 'w')
685 try:
686 f.write(SETUPTOOLS_PKG_INFO)
687 finally:
688 f.close()
689+
690 pth_file = os.path.join(placeholder, 'setuptools.pth')
691 log.warn('Creating %s', pth_file)
692 f = open(pth_file, 'w')
693@@ -299,7 +318,6 @@
694 finally:
695 f.close()
696
697-
698 def _patch_egg_dir(path):
699 # let's check if it's already patched
700 pkg_info = os.path.join(path, 'EGG-INFO', 'PKG-INFO')
701
702=== removed file 'distribute_setup_dev.py'
703--- distribute_setup_dev.py 2009-11-12 02:12:16 +0000
704+++ distribute_setup_dev.py 1970-01-01 00:00:00 +0000
705@@ -1,458 +0,0 @@
706-#!python
707-"""Bootstrap distribute installation
708-
709-If you want to use setuptools in your package's setup.py, just include this
710-file in the same directory with it, and add this to the top of your setup.py::
711-
712- from distribute_setup import use_setuptools
713- use_setuptools()
714-
715-If you want to require a specific version of setuptools, set a download
716-mirror, or use an alternate download directory, you can do so by supplying
717-the appropriate options to ``use_setuptools()``.
718-
719-This file can also be run as a script to install or upgrade setuptools.
720-"""
721-import os
722-import sys
723-import time
724-import fnmatch
725-import tempfile
726-import tarfile
727-from distutils import log
728-
729-try:
730- from site import USER_SITE
731-except ImportError:
732- USER_SITE = None
733-
734-try:
735- import subprocess
736-
737- def _python_cmd(*args):
738- args = (sys.executable,) + args
739- return subprocess.call(args) == 0
740-
741-except ImportError:
742- # will be used for python 2.3
743- def _python_cmd(*args):
744- args = (sys.executable,) + args
745- # quoting arguments if windows
746- if sys.platform == 'win32':
747- def quote(arg):
748- if ' ' in arg:
749- return '"%s"' % arg
750- return arg
751- args = [quote(arg) for arg in args]
752- return os.spawnl(os.P_WAIT, sys.executable, *args) == 0
753-
754-DEFAULT_VERSION = "0.6.7dev"
755-DEFAULT_URL = "http://python-distribute.org/"
756-SETUPTOOLS_PKG_INFO = """\
757-Metadata-Version: 1.0
758-Name: setuptools
759-Version: 0.6c9
760-Summary: xxxx
761-Home-page: xxx
762-Author: xxx
763-Author-email: xxx
764-License: xxx
765-Description: xxx
766-"""
767-
768-
769-def _install(tarball):
770- # extracting the tarball
771- tmpdir = tempfile.mkdtemp()
772- log.warn('Extracting in %s', tmpdir)
773- old_wd = os.getcwd()
774- try:
775- os.chdir(tmpdir)
776- tar = tarfile.open(tarball)
777- _extractall(tar)
778- tar.close()
779-
780- # going in the directory
781- subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0])
782- os.chdir(subdir)
783- log.warn('Now working in %s', subdir)
784-
785- # installing
786- log.warn('Installing Distribute')
787- assert _python_cmd('setup.py', 'install')
788- finally:
789- os.chdir(old_wd)
790-
791-
792-def _build_egg(egg, tarball, to_dir):
793- # extracting the tarball
794- tmpdir = tempfile.mkdtemp()
795- log.warn('Extracting in %s', tmpdir)
796- old_wd = os.getcwd()
797- try:
798- os.chdir(tmpdir)
799- tar = tarfile.open(tarball)
800- _extractall(tar)
801- tar.close()
802-
803- # going in the directory
804- subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0])
805- os.chdir(subdir)
806- log.warn('Now working in %s', subdir)
807-
808- # building an egg
809- log.warn('Building a Distribute egg in %s', to_dir)
810- _python_cmd('setup.py', '-q', 'bdist_egg', '--dist-dir', to_dir)
811-
812- finally:
813- os.chdir(old_wd)
814- # returning the result
815- log.warn(egg)
816- if not os.path.exists(egg):
817- raise IOError('Could not build the egg.')
818-
819-
820-def _do_download(version, download_base, to_dir, download_delay):
821- egg = os.path.join(to_dir, 'distribute-%s-py%d.%d.egg'
822- % (version, sys.version_info[0], sys.version_info[1]))
823- if not os.path.exists(egg):
824- tarball = download_setuptools(version, download_base,
825- to_dir, download_delay)
826- _build_egg(egg, tarball, to_dir)
827- sys.path.insert(0, egg)
828- import setuptools
829- setuptools.bootstrap_install_from = egg
830-
831-
832-def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
833- to_dir=os.curdir, download_delay=15, no_fake=True):
834- # making sure we use the absolute path
835- to_dir = os.path.abspath(to_dir)
836- was_imported = 'pkg_resources' in sys.modules or \
837- 'setuptools' in sys.modules
838- try:
839- try:
840- import pkg_resources
841- if not hasattr(pkg_resources, '_distribute'):
842- if not no_fake:
843- _fake_setuptools()
844- raise ImportError
845- except ImportError:
846- return _do_download(version, download_base, to_dir, download_delay)
847- try:
848- pkg_resources.require("distribute>="+version)
849- return
850- except pkg_resources.VersionConflict:
851- e = sys.exc_info()[1]
852- if was_imported:
853- sys.stderr.write(
854- "The required version of distribute (>=%s) is not available,\n"
855- "and can't be installed while this script is running. Please\n"
856- "install a more recent version first, using\n"
857- "'easy_install -U distribute'."
858- "\n\n(Currently using %r)\n" % (version, e.args[0]))
859- sys.exit(2)
860- else:
861- del pkg_resources, sys.modules['pkg_resources'] # reload ok
862- return _do_download(version, download_base, to_dir,
863- download_delay)
864- except pkg_resources.DistributionNotFound:
865- return _do_download(version, download_base, to_dir,
866- download_delay)
867- finally:
868- if not no_fake:
869- _create_fake_setuptools_pkg_info(to_dir)
870-
871-def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
872- to_dir=os.curdir, delay=15):
873- """Download distribute from a specified location and return its filename
874-
875- `version` should be a valid distribute version number that is available
876- as an egg for download under the `download_base` URL (which should end
877- with a '/'). `to_dir` is the directory where the egg will be downloaded.
878- `delay` is the number of seconds to pause before an actual download
879- attempt.
880- """
881- # making sure we use the absolute path
882- to_dir = os.path.abspath(to_dir)
883- try:
884- from urllib.request import urlopen
885- except ImportError:
886- from urllib2 import urlopen
887- tgz_name = "distribute-%s.tar.gz" % version
888- url = download_base + tgz_name
889- saveto = os.path.join(to_dir, tgz_name)
890- src = dst = None
891- if not os.path.exists(saveto): # Avoid repeated downloads
892- try:
893- log.warn("Downloading %s", url)
894- src = urlopen(url)
895- # Read/write all in one block, so we don't create a corrupt file
896- # if the download is interrupted.
897- data = src.read()
898- dst = open(saveto, "wb")
899- dst.write(data)
900- finally:
901- if src:
902- src.close()
903- if dst:
904- dst.close()
905- return os.path.realpath(saveto)
906-
907-
908-def _patch_file(path, content):
909- """Will backup the file then patch it"""
910- existing_content = open(path).read()
911- if existing_content == content:
912- # already patched
913- log.warn('Already patched.')
914- return False
915- log.warn('Patching...')
916- _rename_path(path)
917- f = open(path, 'w')
918- try:
919- f.write(content)
920- finally:
921- f.close()
922- return True
923-
924-
925-def _same_content(path, content):
926- return open(path).read() == content
927-
928-
929-def _rename_path(path):
930- new_name = path + '.OLD.%s' % time.time()
931- log.warn('Renaming %s into %s', path, new_name)
932- try:
933- from setuptools.sandbox import DirectorySandbox
934- def _violation(*args):
935- pass
936- DirectorySandbox._violation = _violation
937- except ImportError:
938- pass
939-
940- os.rename(path, new_name)
941- return new_name
942-
943-
944-def _remove_flat_installation(placeholder):
945- if not os.path.isdir(placeholder):
946- log.warn('Unkown installation at %s', placeholder)
947- return False
948- found = False
949- for file in os.listdir(placeholder):
950- if fnmatch.fnmatch(file, 'setuptools*.egg-info'):
951- found = True
952- break
953- if not found:
954- log.warn('Could not locate setuptools*.egg-info')
955- return
956-
957- log.warn('Removing elements out of the way...')
958- pkg_info = os.path.join(placeholder, file)
959- if os.path.isdir(pkg_info):
960- patched = _patch_egg_dir(pkg_info)
961- else:
962- patched = _patch_file(pkg_info, SETUPTOOLS_PKG_INFO)
963-
964- if not patched:
965- log.warn('%s already patched.', pkg_info)
966- return False
967- # now let's move the files out of the way
968- for element in ('setuptools', 'pkg_resources.py', 'site.py'):
969- element = os.path.join(placeholder, element)
970- if os.path.exists(element):
971- _rename_path(element)
972- else:
973- log.warn('Could not find the %s element of the '
974- 'Setuptools distribution', element)
975- return True
976-
977-
978-def _after_install(dist):
979- log.warn('After install bootstrap.')
980- placeholder = dist.get_command_obj('install').install_purelib
981- _create_fake_setuptools_pkg_info(placeholder)
982-
983-def _create_fake_setuptools_pkg_info(placeholder):
984- if not placeholder or not os.path.exists(placeholder):
985- log.warn('Could not find the install location')
986- return
987- pyver = '%s.%s' % (sys.version_info[0], sys.version_info[1])
988- setuptools_file = 'setuptools-0.6c9.egg-info'
989- pkg_info = os.path.join(placeholder, setuptools_file)
990- if os.path.exists(pkg_info):
991- log.warn('%s already exists', pkg_info)
992- return
993- log.warn('Creating %s', pkg_info)
994- f = open(pkg_info, 'w')
995- try:
996- f.write(SETUPTOOLS_PKG_INFO)
997- finally:
998- f.close()
999- pth_file = os.path.join(placeholder, 'setuptools.pth')
1000- log.warn('Creating %s', pth_file)
1001- f = open(pth_file, 'w')
1002- try:
1003- f.write(os.path.join(os.curdir, setuptools_file))
1004- finally:
1005- f.close()
1006-
1007-
1008-def _patch_egg_dir(path):
1009- # let's check if it's already patched
1010- pkg_info = os.path.join(path, 'EGG-INFO', 'PKG-INFO')
1011- if os.path.exists(pkg_info):
1012- if _same_content(pkg_info, SETUPTOOLS_PKG_INFO):
1013- log.warn('%s already patched.', pkg_info)
1014- return False
1015- _rename_path(path)
1016- os.mkdir(path)
1017- os.mkdir(os.path.join(path, 'EGG-INFO'))
1018- pkg_info = os.path.join(path, 'EGG-INFO', 'PKG-INFO')
1019- f = open(pkg_info, 'w')
1020- try:
1021- f.write(SETUPTOOLS_PKG_INFO)
1022- finally:
1023- f.close()
1024- return True
1025-
1026-
1027-def _before_install():
1028- log.warn('Before install bootstrap.')
1029- _fake_setuptools()
1030-
1031-
1032-def _under_prefix(location):
1033- if 'install' not in sys.argv:
1034- return True
1035- args = sys.argv[sys.argv.index('install')+1:]
1036- for index, arg in enumerate(args):
1037- for option in ('--root', '--prefix'):
1038- if arg.startswith('%s=' % option):
1039- top_dir = arg.split('root=')[-1]
1040- return location.startswith(top_dir)
1041- elif arg == option:
1042- if len(args) > index:
1043- top_dir = args[index+1]
1044- return location.startswith(top_dir)
1045- elif option == '--user' and USER_SITE is not None:
1046- return location.startswith(USER_SITE)
1047- return True
1048-
1049-
1050-def _fake_setuptools():
1051- log.warn('Scanning installed packages')
1052- try:
1053- import pkg_resources
1054- except ImportError:
1055- # we're cool
1056- log.warn('Setuptools or Distribute does not seem to be installed.')
1057- return
1058- ws = pkg_resources.working_set
1059- try:
1060- setuptools_dist = ws.find(pkg_resources.Requirement.parse('setuptools',
1061- replacement=False))
1062- except TypeError:
1063- # old distribute API
1064- setuptools_dist = ws.find(pkg_resources.Requirement.parse('setuptools'))
1065-
1066- if setuptools_dist is None:
1067- log.warn('No setuptools distribution found')
1068- return
1069- # detecting if it was already faked
1070- setuptools_location = setuptools_dist.location
1071- log.warn('Setuptools installation detected at %s', setuptools_location)
1072-
1073- # if --root or --preix was provided, and if
1074- # setuptools is not located in them, we don't patch it
1075- if not _under_prefix(setuptools_location):
1076- log.warn('Not patching, --root or --prefix is installing Distribute'
1077- ' in another location')
1078- return
1079-
1080- # let's see if its an egg
1081- if not setuptools_location.endswith('.egg'):
1082- log.warn('Non-egg installation')
1083- res = _remove_flat_installation(setuptools_location)
1084- if not res:
1085- return
1086- else:
1087- log.warn('Egg installation')
1088- pkg_info = os.path.join(setuptools_location, 'EGG-INFO', 'PKG-INFO')
1089- if (os.path.exists(pkg_info) and
1090- _same_content(pkg_info, SETUPTOOLS_PKG_INFO)):
1091- log.warn('Already patched.')
1092- return
1093- log.warn('Patching...')
1094- # let's create a fake egg replacing setuptools one
1095- res = _patch_egg_dir(setuptools_location)
1096- if not res:
1097- return
1098- log.warn('Patched done.')
1099- _relaunch()
1100-
1101-
1102-def _relaunch():
1103- log.warn('Relaunching...')
1104- # we have to relaunch the process
1105- args = [sys.executable] + sys.argv
1106- sys.exit(subprocess.call(args))
1107-
1108-
1109-def _extractall(self, path=".", members=None):
1110- """Extract all members from the archive to the current working
1111- directory and set owner, modification time and permissions on
1112- directories afterwards. `path' specifies a different directory
1113- to extract to. `members' is optional and must be a subset of the
1114- list returned by getmembers().
1115- """
1116- import copy
1117- import operator
1118- from tarfile import ExtractError
1119- directories = []
1120-
1121- if members is None:
1122- members = self
1123-
1124- for tarinfo in members:
1125- if tarinfo.isdir():
1126- # Extract directories with a safe mode.
1127- directories.append(tarinfo)
1128- tarinfo = copy.copy(tarinfo)
1129- tarinfo.mode = 448 # decimal for oct 0700
1130- self.extract(tarinfo, path)
1131-
1132- # Reverse sort directories.
1133- if sys.version_info < (2, 4):
1134- def sorter(dir1, dir2):
1135- return cmp(dir1.name, dir2.name)
1136- directories.sort(sorter)
1137- directories.reverse()
1138- else:
1139- directories.sort(key=operator.attrgetter('name'), reverse=True)
1140-
1141- # Set correct owner, mtime and filemode on directories.
1142- for tarinfo in directories:
1143- dirpath = os.path.join(path, tarinfo.name)
1144- try:
1145- self.chown(tarinfo, dirpath)
1146- self.utime(tarinfo, dirpath)
1147- self.chmod(tarinfo, dirpath)
1148- except ExtractError:
1149- e = sys.exc_info()[1]
1150- if self.errorlevel > 1:
1151- raise
1152- else:
1153- self._dbg(1, "tarfile: %s" % e)
1154-
1155-
1156-def main(argv, version=DEFAULT_VERSION):
1157- """Install or upgrade setuptools and EasyInstall"""
1158- tarball = download_setuptools()
1159- _install(tarball)
1160-
1161-
1162-if __name__ == '__main__':
1163- main(sys.argv[1:])
1164
1165=== added directory 'docs/_templates'
1166=== added file 'docs/_templates/indexsidebar.html'
1167--- docs/_templates/indexsidebar.html 1970-01-01 00:00:00 +0000
1168+++ docs/_templates/indexsidebar.html 2010-01-19 00:05:23 +0000
1169@@ -0,0 +1,8 @@
1170+<h3>Download</h3>
1171+
1172+<p>Current version: <b>{{ version }}</b></p>
1173+<p>Get Distribute from the <a href="http://pypi.python.org/pypi/distribute"> Python Package Index</a>
1174+
1175+<h3>Questions? Suggestions? Contributions?</h3>
1176+
1177+<p>Visit the <a href="http://bitbucket.org/tarek/distribute">Distribute project page</a> </p>
1178
1179=== modified file 'docs/build/html/_sources/easy_install.txt'
1180--- docs/build/html/_sources/easy_install.txt 2009-11-12 02:12:16 +0000
1181+++ docs/build/html/_sources/easy_install.txt 2010-01-19 00:05:23 +0000
1182@@ -628,6 +628,9 @@
1183 For more information, see also the current Python documentation on the `use and
1184 location of distutils configuration files <http://docs.python.org/inst/config-syntax.html>`_.
1185
1186+Notice that ``easy_install`` will use the ``setup.cfg`` from the current
1187+working directory only if it was triggered from ``setup.py`` through the
1188+``install_requires`` option. The standalone command will not use that file.
1189
1190 Command-Line Options
1191 --------------------
1192@@ -904,7 +907,7 @@
1193 projects, not in-development ones, because such projects may not
1194 have a currently-valid version number. So, it usually only installs them
1195 when their ``setup.py`` directory is explicitly passed on the command line.
1196-
1197+
1198 However, if this option is used, then any in-development projects that were
1199 installed using the ``setup.py develop`` command, will be used to build
1200 eggs, effectively upgrading the "in-development" project to a snapshot
1201@@ -1257,7 +1260,7 @@
1202 installed using ``setup.py develop``.
1203
1204 * Fixed not HTML-decoding URLs scraped from web pages
1205-
1206+
1207 0.6c5
1208 * Fixed ``.dll`` files on Cygwin not having executable permisions when an egg
1209 is installed unzipped.
1210
1211=== modified file 'docs/build/html/_sources/index.txt'
1212--- docs/build/html/_sources/index.txt 2009-10-20 00:12:26 +0000
1213+++ docs/build/html/_sources/index.txt 2010-01-19 00:05:23 +0000
1214@@ -1,7 +1,23 @@
1215 Welcome to Distribute's documentation!
1216 ======================================
1217
1218-Contents:
1219+`Distribute` is a fork of the `Setuptools` project.
1220+
1221+Distribute is intended to replace Setuptools as the standard method for
1222+working with Python module distributions.
1223+
1224+For those who may wonder why they should switch to Distribute over Setuptools, it’s quite simple:
1225+
1226+- Distribute is a drop-in replacement for Setuptools
1227+- The code is actively maintained, and has over 10 commiters
1228+- Distribute offers Python 3 support !
1229+
1230+.. image:: http://python-distribute.org/pip_distribute.png
1231+
1232+Design done by Idan Gazit (http://pixane.com) - License: cc-by-3.0
1233+
1234+
1235+Documentation content:
1236
1237 .. toctree::
1238 :maxdepth: 2
1239
1240=== modified file 'docs/build/html/_sources/pkg_resources.txt'
1241--- docs/build/html/_sources/pkg_resources.txt 2009-10-20 00:12:26 +0000
1242+++ docs/build/html/_sources/pkg_resources.txt 2010-01-19 00:05:23 +0000
1243@@ -1594,8 +1594,9 @@
1244 ``Requirement`` string, as a distribution name, or a PyPI project name.
1245 All non-alphanumeric runs are condensed to single "-" characters, such that
1246 a name like "The $$$ Tree" becomes "The-Tree". Note that if you are
1247- generating a filename from this value you should replace the "-" characters
1248- with underscores ("_") because setuptools and the distutils
1249+ generating a filename from this value you should combine it with a call to
1250+ ``to_filename()`` so all dashes ("-") are replaced by underscores ("_").
1251+ See ``to_filename()``.
1252
1253 ``safe_version(version)``
1254 Similar to ``safe_name()`` except that spaces in the input become dots, and
1255@@ -1708,7 +1709,7 @@
1256
1257 * Fix cache dir defaults on Windows when multiple environment vars are needed
1258 to construct a path.
1259-
1260+
1261 0.6c4
1262 * Fix "dev" versions being considered newer than release candidates.
1263
1264
1265=== modified file 'docs/build/html/_sources/roadmap.txt'
1266--- docs/build/html/_sources/roadmap.txt 2009-10-24 13:13:23 +0000
1267+++ docs/build/html/_sources/roadmap.txt 2010-01-19 00:05:23 +0000
1268@@ -4,7 +4,7 @@
1269
1270 Distribute has two branches:
1271
1272-- 0.6.x : provides a Setuptools-0.6c9 compatible version
1273+- 0.6.x : provides a Setuptools-0.6cX compatible version
1274 - 0.7.x : will provide a refactoring
1275
1276 0.6.x
1277@@ -69,7 +69,7 @@
1278 reorganized in clean, pep-8 modules. This package will
1279 only contain the query APIs and will focus on being PEP 376
1280 compatible. We will promote its usage and see if Pip wants
1281- to use it as a basis.
1282+ to use it as a basis.
1283 It will probably shrink a lot though, once the stdlib provides PEP 376 support.
1284
1285 - distribute.entrypoints: that's the old pkg_resources entry points
1286
1287=== modified file 'docs/conf.py'
1288--- docs/conf.py 2009-11-12 02:12:16 +0000
1289+++ docs/conf.py 2010-01-19 00:05:23 +0000
1290@@ -48,7 +48,7 @@
1291 # built documents.
1292 #
1293 # The short X.Y version.
1294-version = '0.6.8'
1295+version = '0.6.10'
1296 # The full version, including alpha/beta/rc tags.
1297 release = '0.6.4'
1298
1299@@ -94,7 +94,7 @@
1300
1301 # The theme to use for HTML and HTML Help pages. Major themes that come with
1302 # Sphinx are currently 'default' and 'sphinxdoc'.
1303-html_theme = 'default'
1304+html_theme = 'nature'
1305
1306 # Theme options are theme-specific and customize the look and feel of a theme
1307 # further. For a list of options available for each theme, see the
1308@@ -134,7 +134,8 @@
1309 #html_use_smartypants = True
1310
1311 # Custom sidebar templates, maps document names to template names.
1312-#html_sidebars = {}
1313+html_sidebars = {'index': 'indexsidebar.html'}
1314+
1315
1316 # Additional templates that should be rendered to pages, maps page names to
1317 # template names.
1318
1319=== modified file 'docs/easy_install.txt'
1320--- docs/easy_install.txt 2009-11-12 02:12:16 +0000
1321+++ docs/easy_install.txt 2010-01-19 00:05:23 +0000
1322@@ -628,6 +628,9 @@
1323 For more information, see also the current Python documentation on the `use and
1324 location of distutils configuration files <http://docs.python.org/inst/config-syntax.html>`_.
1325
1326+Notice that ``easy_install`` will use the ``setup.cfg`` from the current
1327+working directory only if it was triggered from ``setup.py`` through the
1328+``install_requires`` option. The standalone command will not use that file.
1329
1330 Command-Line Options
1331 --------------------
1332@@ -904,7 +907,7 @@
1333 projects, not in-development ones, because such projects may not
1334 have a currently-valid version number. So, it usually only installs them
1335 when their ``setup.py`` directory is explicitly passed on the command line.
1336-
1337+
1338 However, if this option is used, then any in-development projects that were
1339 installed using the ``setup.py develop`` command, will be used to build
1340 eggs, effectively upgrading the "in-development" project to a snapshot
1341@@ -1257,7 +1260,7 @@
1342 installed using ``setup.py develop``.
1343
1344 * Fixed not HTML-decoding URLs scraped from web pages
1345-
1346+
1347 0.6c5
1348 * Fixed ``.dll`` files on Cygwin not having executable permisions when an egg
1349 is installed unzipped.
1350
1351=== modified file 'docs/index.txt'
1352--- docs/index.txt 2009-10-20 00:12:26 +0000
1353+++ docs/index.txt 2010-01-19 00:05:23 +0000
1354@@ -1,7 +1,23 @@
1355 Welcome to Distribute's documentation!
1356 ======================================
1357
1358-Contents:
1359+`Distribute` is a fork of the `Setuptools` project.
1360+
1361+Distribute is intended to replace Setuptools as the standard method for
1362+working with Python module distributions.
1363+
1364+For those who may wonder why they should switch to Distribute over Setuptools, it’s quite simple:
1365+
1366+- Distribute is a drop-in replacement for Setuptools
1367+- The code is actively maintained, and has over 10 commiters
1368+- Distribute offers Python 3 support !
1369+
1370+.. image:: http://python-distribute.org/pip_distribute.png
1371+
1372+Design done by Idan Gazit (http://pixane.com) - License: cc-by-3.0
1373+
1374+
1375+Documentation content:
1376
1377 .. toctree::
1378 :maxdepth: 2
1379
1380=== modified file 'docs/pkg_resources.txt'
1381--- docs/pkg_resources.txt 2009-10-20 00:12:26 +0000
1382+++ docs/pkg_resources.txt 2010-01-19 00:05:23 +0000
1383@@ -1594,8 +1594,9 @@
1384 ``Requirement`` string, as a distribution name, or a PyPI project name.
1385 All non-alphanumeric runs are condensed to single "-" characters, such that
1386 a name like "The $$$ Tree" becomes "The-Tree". Note that if you are
1387- generating a filename from this value you should replace the "-" characters
1388- with underscores ("_") because setuptools and the distutils
1389+ generating a filename from this value you should combine it with a call to
1390+ ``to_filename()`` so all dashes ("-") are replaced by underscores ("_").
1391+ See ``to_filename()``.
1392
1393 ``safe_version(version)``
1394 Similar to ``safe_name()`` except that spaces in the input become dots, and
1395@@ -1708,7 +1709,7 @@
1396
1397 * Fix cache dir defaults on Windows when multiple environment vars are needed
1398 to construct a path.
1399-
1400+
1401 0.6c4
1402 * Fix "dev" versions being considered newer than release candidates.
1403
1404
1405=== modified file 'docs/roadmap.txt'
1406--- docs/roadmap.txt 2009-10-24 13:13:23 +0000
1407+++ docs/roadmap.txt 2010-01-19 00:05:23 +0000
1408@@ -4,7 +4,7 @@
1409
1410 Distribute has two branches:
1411
1412-- 0.6.x : provides a Setuptools-0.6c9 compatible version
1413+- 0.6.x : provides a Setuptools-0.6cX compatible version
1414 - 0.7.x : will provide a refactoring
1415
1416 0.6.x
1417@@ -69,7 +69,7 @@
1418 reorganized in clean, pep-8 modules. This package will
1419 only contain the query APIs and will focus on being PEP 376
1420 compatible. We will promote its usage and see if Pip wants
1421- to use it as a basis.
1422+ to use it as a basis.
1423 It will probably shrink a lot though, once the stdlib provides PEP 376 support.
1424
1425 - distribute.entrypoints: that's the old pkg_resources entry points
1426
1427=== modified file 'easy_install.py' (properties changed: +x to -x)
1428=== removed file 'll.txt'
1429--- ll.txt 2009-11-12 02:12:16 +0000
1430+++ ll.txt 1970-01-01 00:00:00 +0000
1431@@ -1,37 +0,0 @@
1432-changeset: 428:d9553f25b2a7
1433-branch: 0.6-maintenance
1434-parent: 423:097e168467b3
1435-user: Lennart Regebro <regebro@gmail.com>
1436-date: Tue Sep 22 17:25:53 2009 +0200
1437-summary: Name changes of the parameters.
1438-
1439-changeset: 417:60afc590239e
1440-branch: 0.6-maintenance
1441-user: Lennart Regebro <regebro@gmail.com>
1442-date: Fri Sep 18 17:22:17 2009 +0200
1443-summary: Works with zope.interface now.
1444-
1445-changeset: 146:53a59c53dedb
1446-branch: setuptools-0.6
1447-user: phillip.eby
1448-date: Sat Jan 19 02:55:03 2008 +0000
1449-summary: Fix interactions between the various "require" options,
1450-
1451-changeset: 127:56694796612e
1452-branch: setuptools-0.6
1453-user: phillip.eby
1454-date: Fri Mar 02 01:23:32 2007 +0000
1455-summary: Fix problem activating dependencies for tests (backport from trunk)
1456-
1457-changeset: 126:f4fbe686d6fe
1458-branch: setuptools-0.6
1459-user: phillip.eby
1460-date: Sat Feb 24 22:11:47 2007 +0000
1461-summary: Fix ``test`` command possibly failing if an older version of the project
1462-
1463-changeset: 0:b18d83e6dbf3
1464-branch: setuptools-0.6
1465-user: phillip.eby
1466-date: Fri Apr 14 17:31:02 2006 +0000
1467-summary: Creating a branch for the "stable" 0.6 development line of setuptools,
1468-
1469
1470=== removed file 'ok.txt'
1471--- ok.txt 2009-11-12 02:12:16 +0000
1472+++ ok.txt 1970-01-01 00:00:00 +0000
1473@@ -1,804 +0,0 @@
1474-Index: ../../svn.python.org/setuptools-0.6/setuptools/sandbox.py
1475-===================================================================
1476---- ../../svn.python.org/setuptools-0.6/setuptools/sandbox.py (révision 75384)
1477-+++ ../../svn.python.org/setuptools-0.6/setuptools/sandbox.py (révision 75385)
1478-@@ -1,14 +1,46 @@
1479--import os, sys, __builtin__, tempfile, operator
1480-+import os, sys, __builtin__, tempfile, operator, pkg_resources
1481- _os = sys.modules[os.name]
1482- _open = open
1483-+_file = file
1484-+
1485- from distutils.errors import DistutilsError
1486-+from pkg_resources import working_set
1487-+
1488- __all__ = [
1489- "AbstractSandbox", "DirectorySandbox", "SandboxViolation", "run_setup",
1490- ]
1491-
1492-+
1493-+
1494-+
1495-+
1496-+
1497-+
1498-+
1499-+
1500-+
1501-+
1502-+
1503-+
1504-+
1505-+
1506-+
1507-+
1508-+
1509-+
1510-+
1511-+
1512-+
1513-+
1514-+
1515-+
1516-+
1517-+
1518-+
1519-+
1520-+
1521- def run_setup(setup_script, args):
1522- """Run a distutils setup script, sandboxed in its directory"""
1523--
1524- old_dir = os.getcwd()
1525- save_argv = sys.argv[:]
1526- save_path = sys.path[:]
1527-@@ -16,13 +48,16 @@
1528- temp_dir = os.path.join(setup_dir,'temp')
1529- if not os.path.isdir(temp_dir): os.makedirs(temp_dir)
1530- save_tmp = tempfile.tempdir
1531--
1532-+ save_modules = sys.modules.copy()
1533-+ pr_state = pkg_resources.__getstate__()
1534- try:
1535-- tempfile.tempdir = temp_dir
1536-- os.chdir(setup_dir)
1537-+ tempfile.tempdir = temp_dir; os.chdir(setup_dir)
1538- try:
1539- sys.argv[:] = [setup_script]+list(args)
1540- sys.path.insert(0, setup_dir)
1541-+ # reset to include setup dir, w/clean callback list
1542-+ working_set.__init__()
1543-+ working_set.callbacks.append(lambda dist:dist.activate())
1544- DirectorySandbox(setup_dir).run(
1545- lambda: execfile(
1546- "setup.py",
1547-@@ -34,11 +69,17 @@
1548- raise
1549- # Normal exit, just return
1550- finally:
1551-+ pkg_resources.__setstate__(pr_state)
1552-+ sys.modules.update(save_modules)
1553-+ for key in list(sys.modules):
1554-+ if key not in save_modules: del sys.modules[key]
1555- os.chdir(old_dir)
1556- sys.path[:] = save_path
1557- sys.argv[:] = save_argv
1558- tempfile.tempdir = save_tmp
1559-
1560-+
1561-+
1562- class AbstractSandbox:
1563- """Wrap 'os' module and 'open()' builtin for virtualizing setup scripts"""
1564-
1565-@@ -58,15 +99,16 @@
1566- """Run 'func' under os sandboxing"""
1567- try:
1568- self._copy(self)
1569-- __builtin__.open = __builtin__.file = self._open
1570-+ __builtin__.file = self._file
1571-+ __builtin__.open = self._open
1572- self._active = True
1573- return func()
1574- finally:
1575- self._active = False
1576-- __builtin__.open = __builtin__.file = _open
1577-+ __builtin__.open = _file
1578-+ __builtin__.file = _open
1579- self._copy(_os)
1580-
1581--
1582- def _mk_dual_path_wrapper(name):
1583- original = getattr(_os,name)
1584- def wrap(self,src,dst,*args,**kw):
1585-@@ -75,7 +117,6 @@
1586- return original(src,dst,*args,**kw)
1587- return wrap
1588-
1589--
1590- for name in ["rename", "link", "symlink"]:
1591- if hasattr(_os,name): locals()[name] = _mk_dual_path_wrapper(name)
1592-
1593-@@ -88,7 +129,8 @@
1594- return original(path,*args,**kw)
1595- return wrap
1596-
1597-- _open = _mk_single_path_wrapper('file', _open)
1598-+ _open = _mk_single_path_wrapper('open', _open)
1599-+ _file = _mk_single_path_wrapper('file', _file)
1600- for name in [
1601- "stat", "listdir", "chdir", "open", "chmod", "chown", "mkdir",
1602- "remove", "unlink", "rmdir", "utime", "lchown", "chroot", "lstat",
1603-@@ -96,7 +138,6 @@
1604- ]:
1605- if hasattr(_os,name): locals()[name] = _mk_single_path_wrapper(name)
1606-
1607--
1608- def _mk_single_with_return(name):
1609- original = getattr(_os,name)
1610- def wrap(self,path,*args,**kw):
1611-@@ -187,22 +228,22 @@
1612- self._violation(operation, src, dst, *args, **kw)
1613- return (src,dst)
1614-
1615-+ def _file(self, path, mode='r', *args, **kw):
1616-+ if mode not in ('r', 'rt', 'rb', 'rU', 'U') and not self._ok(path):
1617-+ self._violation("file", path, mode, *args, **kw)
1618-+ return _file(path,mode,*args,**kw)
1619-+
1620- def open(self, file, flags, mode=0777):
1621- """Called for low-level os.open()"""
1622- if flags & WRITE_FLAGS and not self._ok(file):
1623- self._violation("os.open", file, flags, mode)
1624- return _os.open(file,flags,mode)
1625-
1626--
1627- WRITE_FLAGS = reduce(
1628-- operator.or_,
1629-- [getattr(_os, a, 0) for a in
1630-+ operator.or_, [getattr(_os, a, 0) for a in
1631- "O_WRONLY O_RDWR O_APPEND O_CREAT O_TRUNC O_TEMPORARY".split()]
1632- )
1633-
1634--
1635--
1636--
1637- class SandboxViolation(DistutilsError):
1638- """A setup script attempted to modify the filesystem outside the sandbox"""
1639-
1640-Index: ../../svn.python.org/setuptools-0.6/setuptools/__init__.py
1641-===================================================================
1642---- ../../svn.python.org/setuptools-0.6/setuptools/__init__.py (révision 75384)
1643-+++ ../../svn.python.org/setuptools-0.6/setuptools/__init__.py (révision 75385)
1644-@@ -7,7 +7,7 @@
1645- from distutils.util import convert_path
1646- import os.path
1647-
1648--__version__ = '0.6c9'
1649-+__version__ = '0.6c10'
1650- __all__ = [
1651- 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require',
1652- 'find_packages'
1653-Index: ../../svn.python.org/setuptools-0.6/setuptools/depends.py
1654-===================================================================
1655---- ../../svn.python.org/setuptools-0.6/setuptools/depends.py (révision 75384)
1656-+++ ../../svn.python.org/setuptools-0.6/setuptools/depends.py (révision 75385)
1657-@@ -36,7 +36,7 @@
1658- def version_ok(self,version):
1659- """Is 'version' sufficiently up-to-date?"""
1660- return self.attribute is None or self.format is None or \
1661-- str(version)<>"unknown" and version >= self.requested_version
1662-+ str(version)!="unknown" and version >= self.requested_version
1663-
1664-
1665- def get_version(self, paths=None, default="unknown"):
1666-Index: ../../svn.python.org/setuptools-0.6/setuptools/package_index.py
1667-===================================================================
1668---- ../../svn.python.org/setuptools-0.6/setuptools/package_index.py (révision 75384)
1669-+++ ../../svn.python.org/setuptools-0.6/setuptools/package_index.py (révision 75385)
1670-@@ -1,5 +1,6 @@
1671- """PyPI and direct package downloading"""
1672- import sys, os.path, re, urlparse, urllib2, shutil, random, socket, cStringIO
1673-+import httplib
1674- from pkg_resources import *
1675- from distutils import log
1676- from distutils.errors import DistutilsError
1677-@@ -8,7 +9,6 @@
1678- except ImportError:
1679- from md5 import md5
1680- from fnmatch import translate
1681--
1682- EGG_FRAGMENT = re.compile(r'^egg=([-A-Za-z0-9_.]+)$')
1683- HREF = re.compile("""href\\s*=\\s*['"]?([^'"> ]+)""", re.I)
1684- # this is here to fix emacs' cruddy broken syntax highlighting
1685-@@ -42,6 +42,8 @@
1686- def egg_info_for_url(url):
1687- scheme, server, path, parameters, query, fragment = urlparse.urlparse(url)
1688- base = urllib2.unquote(path.split('/')[-1])
1689-+ if server=='sourceforge.net' and base=='download': # XXX Yuck
1690-+ base = urllib2.unquote(path.split('/')[-2])
1691- if '#' in base: base, fragment = base.split('#',1)
1692- return base,fragment
1693-
1694-@@ -64,14 +66,12 @@
1695- if basename.endswith('.egg') and '-' in basename:
1696- # only one, unambiguous interpretation
1697- return [Distribution.from_location(location, basename, metadata)]
1698--
1699- if basename.endswith('.exe'):
1700- win_base, py_ver = parse_bdist_wininst(basename)
1701- if win_base is not None:
1702- return interpret_distro_name(
1703- location, win_base, metadata, py_ver, BINARY_DIST, "win32"
1704- )
1705--
1706- # Try source distro extensions (.zip, .tgz, etc.)
1707- #
1708- for ext in EXTENSIONS:
1709-@@ -186,10 +186,10 @@
1710- return
1711-
1712- self.info("Reading %s", url)
1713-+ self.fetched_urls[url] = True # prevent multiple fetch attempts
1714- f = self.open_url(url, "Download error: %s -- Some packages may not be found!")
1715- if f is None: return
1716-- self.fetched_urls[url] = self.fetched_urls[f.url] = True
1717--
1718-+ self.fetched_urls[f.url] = True
1719- if 'html' not in f.headers.get('content-type', '').lower():
1720- f.close() # not html, we can't process it
1721- return
1722-@@ -329,7 +329,7 @@
1723- def check_md5(self, cs, info, filename, tfp):
1724- if re.match('md5=[0-9a-f]{32}$', info):
1725- self.debug("Validating md5 checksum for %s", filename)
1726-- if cs.hexdigest()<>info[4:]:
1727-+ if cs.hexdigest()!=info[4:]:
1728- tfp.close()
1729- os.unlink(filename)
1730- raise DistutilsError(
1731-@@ -409,7 +409,8 @@
1732-
1733-
1734- def fetch_distribution(self,
1735-- requirement, tmpdir, force_scan=False, source=False, develop_ok=False
1736-+ requirement, tmpdir, force_scan=False, source=False, develop_ok=False,
1737-+ local_index=None,
1738- ):
1739- """Obtain a distribution suitable for fulfilling `requirement`
1740-
1741-@@ -427,15 +428,15 @@
1742- set, development and system eggs (i.e., those using the ``.egg-info``
1743- format) will be ignored.
1744- """
1745--
1746- # process a Requirement
1747- self.info("Searching for %s", requirement)
1748- skipped = {}
1749-+ dist = None
1750-
1751-- def find(req):
1752-+ def find(env, req):
1753- # Find a matching distribution; may be called more than once
1754-
1755-- for dist in self[req.key]:
1756-+ for dist in env[req.key]:
1757-
1758- if dist.precedence==DEVELOP_DIST and not develop_ok:
1759- if dist not in skipped:
1760-@@ -444,23 +445,25 @@
1761- continue
1762-
1763- if dist in req and (dist.precedence<=SOURCE_DIST or not source):
1764-- self.info("Best match: %s", dist)
1765-- return dist.clone(
1766-- location=self.download(dist.location, tmpdir)
1767-- )
1768-+ return dist
1769-
1770-+
1771-+
1772- if force_scan:
1773- self.prescan()
1774- self.find_packages(requirement)
1775-+ dist = find(self, requirement)
1776-+
1777-+ if local_index is not None:
1778-+ dist = dist or find(local_index, requirement)
1779-
1780-- dist = find(requirement)
1781- if dist is None and self.to_scan is not None:
1782- self.prescan()
1783-- dist = find(requirement)
1784-+ dist = find(self, requirement)
1785-
1786- if dist is None and not force_scan:
1787- self.find_packages(requirement)
1788-- dist = find(requirement)
1789-+ dist = find(self, requirement)
1790-
1791- if dist is None:
1792- self.warn(
1793-@@ -468,8 +471,10 @@
1794- (source and "a source distribution of " or ""),
1795- requirement,
1796- )
1797-- return dist
1798-+ self.info("Best match: %s", dist)
1799-+ return dist.clone(location=self.download(dist.location, tmpdir))
1800-
1801-+
1802- def fetch(self, requirement, tmpdir, force_scan=False, source=False):
1803- """Obtain a file suitable for fulfilling `requirement`
1804-
1805-@@ -485,11 +490,6 @@
1806-
1807-
1808-
1809--
1810--
1811--
1812--
1813--
1814- def gen_setup(self, filename, fragment, tmpdir):
1815- match = EGG_FRAGMENT.match(fragment)
1816- dists = match and [d for d in
1817-@@ -573,17 +573,19 @@
1818-
1819-
1820- def open_url(self, url, warning=None):
1821-- if url.startswith('file:'):
1822-- return local_open(url)
1823-+ if url.startswith('file:'): return local_open(url)
1824- try:
1825- return open_with_auth(url)
1826- except urllib2.HTTPError, v:
1827- return v
1828- except urllib2.URLError, v:
1829-- if warning: self.warn(warning, v.reason)
1830-- else:
1831-- raise DistutilsError("Download error for %s: %s"
1832-- % (url, v.reason))
1833-+ reason = v.reason
1834-+ except httplib.HTTPException, v:
1835-+ reason = "%s: %s" % (v.__doc__ or v.__class__.__name__, v)
1836-+ if warning:
1837-+ self.warn(warning, reason)
1838-+ else:
1839-+ raise DistutilsError("Download error for %s: %s" % (url, reason))
1840-
1841- def _download_url(self, scheme, url, tmpdir):
1842- # Determine download filename
1843-@@ -611,8 +613,6 @@
1844- self.url_ok(url, True) # raises error if not allowed
1845- return self._attempt_download(url, filename)
1846-
1847--
1848--
1849- def scan_url(self, url):
1850- self.process_url(url, True)
1851-
1852-Index: ../../svn.python.org/setuptools-0.6/setuptools/dist.py
1853-===================================================================
1854---- ../../svn.python.org/setuptools-0.6/setuptools/dist.py (révision 75384)
1855-+++ ../../svn.python.org/setuptools-0.6/setuptools/dist.py (révision 75385)
1856-@@ -8,7 +8,7 @@
1857- from distutils.errors import DistutilsOptionError, DistutilsPlatformError
1858- from distutils.errors import DistutilsSetupError
1859- import setuptools, pkg_resources, distutils.core, distutils.dist, distutils.cmd
1860--import os, distutils.log
1861-+import os, distutils.log, re
1862-
1863- def _get_unpatched(cls):
1864- """Protect against re-patching the distutils if reloaded
1865-@@ -61,8 +61,8 @@
1866- parent = '.'.join(nsp.split('.')[:-1])
1867- if parent not in value:
1868- distutils.log.warn(
1869-- "%r is declared as a package namespace, but %r is not:"
1870-- " please correct this in setup.py", nsp, parent
1871-+ "WARNING: %r is declared as a package namespace, but %r"
1872-+ " is not: please correct this in setup.py", nsp, parent
1873- )
1874-
1875- def check_extras(dist, attr, value):
1876-@@ -121,6 +121,47 @@
1877- "wildcard patterns"
1878- )
1879-
1880-+def check_packages(dist, attr, value):
1881-+ for pkgname in value:
1882-+ if not re.match(r'\w+(\.\w+)*', pkgname):
1883-+ distutils.log.warn(
1884-+ "WARNING: %r not a valid package name; please use only"
1885-+ ".-separated package names in setup.py", pkgname
1886-+ )
1887-+
1888-+
1889-+
1890-+
1891-+
1892-+
1893-+
1894-+
1895-+
1896-+
1897-+
1898-+
1899-+
1900-+
1901-+
1902-+
1903-+
1904-+
1905-+
1906-+
1907-+
1908-+
1909-+
1910-+
1911-+
1912-+
1913-+
1914-+
1915-+
1916-+
1917-+
1918-+
1919-+
1920-+
1921- class Distribution(_Distribution):
1922- """Distribution with support for features, tests, and package data
1923-
1924-@@ -415,19 +456,19 @@
1925- if self.packages:
1926- self.packages = [
1927- p for p in self.packages
1928-- if p<>package and not p.startswith(pfx)
1929-+ if p!=package and not p.startswith(pfx)
1930- ]
1931-
1932- if self.py_modules:
1933- self.py_modules = [
1934- p for p in self.py_modules
1935-- if p<>package and not p.startswith(pfx)
1936-+ if p!=package and not p.startswith(pfx)
1937- ]
1938-
1939- if self.ext_modules:
1940- self.ext_modules = [
1941- p for p in self.ext_modules
1942-- if p.name<>package and not p.name.startswith(pfx)
1943-+ if p.name!=package and not p.name.startswith(pfx)
1944- ]
1945-
1946-
1947-Index: ../../svn.python.org/setuptools-0.6/setuptools/command/alias.py
1948-===================================================================
1949---- ../../svn.python.org/setuptools-0.6/setuptools/command/alias.py (révision 75384)
1950-+++ ../../svn.python.org/setuptools-0.6/setuptools/command/alias.py (révision 75385)
1951-@@ -9,7 +9,7 @@
1952- """Quote an argument for later parsing by shlex.split()"""
1953- for c in '"', "'", "\\", "#":
1954- if c in arg: return repr(arg)
1955-- if arg.split()<>[arg]:
1956-+ if arg.split()!=[arg]:
1957- return repr(arg)
1958- return arg
1959-
1960-@@ -33,7 +33,7 @@
1961-
1962- def finalize_options(self):
1963- option_base.finalize_options(self)
1964-- if self.remove and len(self.args)<>1:
1965-+ if self.remove and len(self.args)!=1:
1966- raise DistutilsOptionError(
1967- "Must specify exactly one argument (the alias name) when "
1968- "using --remove"
1969-Index: ../../svn.python.org/setuptools-0.6/setuptools/command/egg_info.py
1970-===================================================================
1971---- ../../svn.python.org/setuptools-0.6/setuptools/command/egg_info.py (révision 75384)
1972-+++ ../../svn.python.org/setuptools-0.6/setuptools/command/egg_info.py (révision 75385)
1973-@@ -217,18 +217,21 @@
1974- data = f.read()
1975- f.close()
1976-
1977-- if data.startswith('9') or data.startswith('8'):
1978-+ if data.startswith('<?xml'):
1979-+ dirurl = urlre.search(data).group(1) # get repository URL
1980-+ localrev = max([int(m.group(1)) for m in revre.finditer(data)]+[0])
1981-+ else:
1982-+ try: svnver = int(data.splitlines()[0])
1983-+ except: svnver=-1
1984-+ if data<8:
1985-+ log.warn("unrecognized .svn/entries format; skipping %s", base)
1986-+ dirs[:] = []
1987-+ continue
1988-+
1989- data = map(str.splitlines,data.split('\n\x0c\n'))
1990- del data[0][0] # get rid of the '8' or '9'
1991- dirurl = data[0][3]
1992- localrev = max([int(d[9]) for d in data if len(d)>9 and d[9]]+[0])
1993-- elif data.startswith('<?xml'):
1994-- dirurl = urlre.search(data).group(1) # get repository URL
1995-- localrev = max([int(m.group(1)) for m in revre.finditer(data)]+[0])
1996-- else:
1997-- log.warn("unrecognized .svn/entries format; skipping %s", base)
1998-- dirs[:] = []
1999-- continue
2000- if base==os.curdir:
2001- base_url = dirurl+'/' # save the root url
2002- elif not dirurl.startswith(base_url):
2003-@@ -241,9 +244,6 @@
2004-
2005-
2006-
2007--
2008--
2009--
2010- def find_sources(self):
2011- """Generate SOURCES.txt manifest file"""
2012- manifest_filename = os.path.join(self.egg_info,"SOURCES.txt")
2013-Index: ../../svn.python.org/setuptools-0.6/setuptools/command/build_ext.py
2014-===================================================================
2015---- ../../svn.python.org/setuptools-0.6/setuptools/command/build_ext.py (révision 75384)
2016-+++ ../../svn.python.org/setuptools-0.6/setuptools/command/build_ext.py (révision 75385)
2017-@@ -82,15 +82,15 @@
2018-
2019- def get_ext_filename(self, fullname):
2020- filename = _build_ext.get_ext_filename(self,fullname)
2021-- ext = self.ext_map[fullname]
2022-- if isinstance(ext,Library):
2023-- fn, ext = os.path.splitext(filename)
2024-- return self.shlib_compiler.library_filename(fn,libtype)
2025-- elif use_stubs and ext._links_to_dynamic:
2026-- d,fn = os.path.split(filename)
2027-- return os.path.join(d,'dl-'+fn)
2028-- else:
2029-- return filename
2030-+ if fullname in self.ext_map:
2031-+ ext = self.ext_map[fullname]
2032-+ if isinstance(ext,Library):
2033-+ fn, ext = os.path.splitext(filename)
2034-+ return self.shlib_compiler.library_filename(fn,libtype)
2035-+ elif use_stubs and ext._links_to_dynamic:
2036-+ d,fn = os.path.split(filename)
2037-+ return os.path.join(d,'dl-'+fn)
2038-+ return filename
2039-
2040- def initialize_options(self):
2041- _build_ext.initialize_options(self)
2042-Index: ../../svn.python.org/setuptools-0.6/setuptools/command/sdist.py
2043-===================================================================
2044---- ../../svn.python.org/setuptools-0.6/setuptools/command/sdist.py (révision 75384)
2045-+++ ../../svn.python.org/setuptools-0.6/setuptools/command/sdist.py (révision 75385)
2046-@@ -1,6 +1,7 @@
2047- from distutils.command.sdist import sdist as _sdist
2048- from distutils.util import convert_path
2049- from distutils import log
2050-+from glob import glob
2051- import os, re, sys, pkg_resources
2052-
2053- entities = [
2054-@@ -38,7 +39,6 @@
2055-
2056-
2057-
2058--
2059- def walk_revctrl(dirname=''):
2060- """Find all files under revision control"""
2061- for ep in pkg_resources.iter_entry_points('setuptools.file_finders'):
2062-@@ -86,18 +86,22 @@
2063- f = open(filename,'rU')
2064- data = f.read()
2065- f.close()
2066-- if data.startswith('9') or data.startswith('8'): # subversion 1.5/1.4
2067-+ if data.startswith('<?xml'):
2068-+ for match in entries_pattern.finditer(data):
2069-+ yield joinpath(dirname,unescape(match.group(1)))
2070-+ else:
2071-+ svnver=-1
2072-+ try: svnver = int(data.splitlines()[0])
2073-+ except: pass
2074-+ if svnver<8:
2075-+ log.warn("unrecognized .svn/entries format in %s", dirname)
2076-+ return
2077- for record in map(str.splitlines, data.split('\n\x0c\n')[1:]):
2078- if not record or len(record)>=6 and record[5]=="delete":
2079- continue # skip deleted
2080- yield joinpath(dirname, record[0])
2081-- elif data.startswith('<?xml'):
2082-- for match in entries_pattern.finditer(data):
2083-- yield joinpath(dirname,unescape(match.group(1)))
2084-- else:
2085-- log.warn("unrecognized .svn/entries format in %s", dirname)
2086-+
2087-
2088--
2089- finders = [
2090- (convert_path('CVS/Entries'),
2091- re_finder(re.compile(r"^\w?/([^/]+)/", re.M))),
2092-@@ -117,10 +121,6 @@
2093-
2094-
2095-
2096--
2097--
2098--
2099--
2100- class sdist(_sdist):
2101- """Smart sdist that finds anything supported by revision control"""
2102-
2103-@@ -162,6 +162,56 @@
2104- sys.exc_info()[2].tb_next.tb_frame.f_locals['template'].close()
2105- raise
2106-
2107-+ # Cribbed from old distutils code, to work around new distutils code
2108-+ # that tries to do some of the same stuff as we do, in a way that makes
2109-+ # us loop.
2110-+
2111-+ def add_defaults (self):
2112-+ standards = [('README', 'README.txt'), self.distribution.script_name]
2113-+
2114-+ for fn in standards:
2115-+ if type(fn) is tuple:
2116-+ alts = fn
2117-+ got_it = 0
2118-+ for fn in alts:
2119-+ if os.path.exists(fn):
2120-+ got_it = 1
2121-+ self.filelist.append(fn)
2122-+ break
2123-+
2124-+ if not got_it:
2125-+ self.warn("standard file not found: should have one of " +
2126-+ string.join(alts, ', '))
2127-+ else:
2128-+ if os.path.exists(fn):
2129-+ self.filelist.append(fn)
2130-+ else:
2131-+ self.warn("standard file '%s' not found" % fn)
2132-+
2133-+ optional = ['test/test*.py', 'setup.cfg']
2134-+
2135-+ for pattern in optional:
2136-+ files = filter(os.path.isfile, glob(pattern))
2137-+ if files:
2138-+ self.filelist.extend(files)
2139-+
2140-+ if self.distribution.has_pure_modules():
2141-+ build_py = self.get_finalized_command('build_py')
2142-+ self.filelist.extend(build_py.get_source_files())
2143-+
2144-+ if self.distribution.has_ext_modules():
2145-+ build_ext = self.get_finalized_command('build_ext')
2146-+ self.filelist.extend(build_ext.get_source_files())
2147-+
2148-+ if self.distribution.has_c_libraries():
2149-+ build_clib = self.get_finalized_command('build_clib')
2150-+ self.filelist.extend(build_clib.get_source_files())
2151-+
2152-+ if self.distribution.has_scripts():
2153-+ build_scripts = self.get_finalized_command('build_scripts')
2154-+ self.filelist.extend(build_scripts.get_source_files())
2155-+
2156-+
2157- def check_readme(self):
2158- alts = ("README", "README.txt")
2159- for f in alts:
2160-@@ -193,13 +243,4 @@
2161-
2162-
2163-
2164--
2165--
2166--
2167--
2168--
2169--
2170--
2171--
2172--
2173- #
2174-Index: ../../svn.python.org/setuptools-0.6/setuptools/command/easy_install.py
2175-===================================================================
2176---- ../../svn.python.org/setuptools-0.6/setuptools/command/easy_install.py (révision 75384)
2177-+++ ../../svn.python.org/setuptools-0.6/setuptools/command/easy_install.py (révision 75385)
2178-@@ -204,7 +204,7 @@
2179- self.outputs = []
2180-
2181- def run(self):
2182-- if self.verbose<>self.distribution.verbose:
2183-+ if self.verbose!=self.distribution.verbose:
2184- log.set_verbosity(self.verbose)
2185- try:
2186- for spec in self.args:
2187-@@ -252,7 +252,7 @@
2188- # Is it a configured, PYTHONPATH, implicit, or explicit site dir?
2189- is_site_dir = instdir in self.all_site_dirs
2190-
2191-- if not is_site_dir:
2192-+ if not is_site_dir and not self.multi_version:
2193- # No? Then directly test whether it does .pth file processing
2194- is_site_dir = self.check_pth_processing()
2195- else:
2196-@@ -430,9 +430,9 @@
2197-
2198- self.check_editable(spec)
2199- dist = self.package_index.fetch_distribution(
2200-- spec, tmpdir, self.upgrade, self.editable, not self.always_copy
2201-+ spec, tmpdir, self.upgrade, self.editable, not self.always_copy,
2202-+ self.local_index
2203- )
2204--
2205- if dist is None:
2206- msg = "Could not find suitable distribution for %r" % spec
2207- if self.always_copy:
2208-@@ -722,7 +722,7 @@
2209- f = open(pkg_inf,'w')
2210- f.write('Metadata-Version: 1.0\n')
2211- for k,v in cfg.items('metadata'):
2212-- if k<>'target_version':
2213-+ if k!='target_version':
2214- f.write('%s: %s\n' % (k.replace('_','-').title(), v))
2215- f.close()
2216- script_dir = os.path.join(egg_info,'scripts')
2217-@@ -988,7 +988,6 @@
2218- def pf(src,dst):
2219- if dst.endswith('.py') and not src.startswith('EGG-INFO/'):
2220- to_compile.append(dst)
2221-- to_chmod.append(dst)
2222- elif dst.endswith('.dll') or dst.endswith('.so'):
2223- to_chmod.append(dst)
2224- self.unpack_progress(src,dst)
2225-@@ -1023,6 +1022,7 @@
2226-
2227-
2228-
2229-+
2230- def no_default_version_msg(self):
2231- return """bad install directory or PYTHONPATH
2232-
2233-@@ -1286,7 +1286,7 @@
2234- if parts[1].endswith('.egg-info'):
2235- prefixes.insert(0,('/'.join(parts[:2]), 'EGG-INFO/'))
2236- break
2237-- if len(parts)<>2 or not name.endswith('.pth'):
2238-+ if len(parts)!=2 or not name.endswith('.pth'):
2239- continue
2240- if name.endswith('-nspkg.pth'):
2241- continue
2242-Index: ../../svn.python.org/setuptools-0.6/setuptools/command/bdist_egg.py
2243-===================================================================
2244---- ../../svn.python.org/setuptools-0.6/setuptools/command/bdist_egg.py (révision 75384)
2245-+++ ../../svn.python.org/setuptools-0.6/setuptools/command/bdist_egg.py (révision 75385)
2246-@@ -165,12 +165,13 @@
2247- def run(self):
2248- # Generate metadata first
2249- self.run_command("egg_info")
2250--
2251- # We run install_lib before install_data, because some data hacks
2252- # pull their data path from the install_lib command.
2253- log.info("installing library code to %s" % self.bdist_dir)
2254- instcmd = self.get_finalized_command('install')
2255- old_root = instcmd.root; instcmd.root = None
2256-+ if self.distribution.has_c_libraries() and not self.skip_build:
2257-+ self.run_command('build_clib')
2258- cmd = self.call_command('install_lib', warn_dir=0)
2259- instcmd.root = old_root
2260-
2261-@@ -190,7 +191,6 @@
2262- to_compile.extend(self.make_init_files())
2263- if to_compile:
2264- cmd.byte_compile(to_compile)
2265--
2266- if self.distribution.data_files:
2267- self.do_install_data()
2268-
2269-@@ -398,7 +398,7 @@
2270- for flag,fn in safety_flags.items():
2271- fn = os.path.join(egg_dir, fn)
2272- if os.path.exists(fn):
2273-- if safe is None or bool(safe)<>flag:
2274-+ if safe is None or bool(safe)!=flag:
2275- os.unlink(fn)
2276- elif safe is not None and bool(safe)==flag:
2277- f=open(fn,'wb'); f.write('\n'); f.close()
2278
2279=== modified file 'pkg_resources.py'
2280--- pkg_resources.py 2009-11-12 02:12:16 +0000
2281+++ pkg_resources.py 2010-01-19 00:05:23 +0000
2282@@ -186,6 +186,15 @@
2283 if not _cache:
2284 import platform
2285 version = platform.mac_ver()[0]
2286+ # fallback for MacPorts
2287+ if version == '':
2288+ import plistlib
2289+ plist = '/System/Library/CoreServices/SystemVersion.plist'
2290+ if os.path.exists(plist):
2291+ plist_content = plistlib.readPlist(plist)
2292+ if 'ProductVersion' in plist_content:
2293+ version = plist_content['ProductVersion']
2294+
2295 _cache.append(version.split('.'))
2296 return _cache[0]
2297
2298@@ -528,7 +537,13 @@
2299 env = Environment(self.entries)
2300 dist = best[req.key] = env.best_match(req, self, installer)
2301 if dist is None:
2302- raise DistributionNotFound(req) # XXX put more info here
2303+ #msg = ("The '%s' distribution was not found on this "
2304+ # "system, and is required by this application.")
2305+ #raise DistributionNotFound(msg % req)
2306+
2307+ # unfortunately, zc.buildout uses a str(err)
2308+ # to get the name of the distribution here..
2309+ raise DistributionNotFound(req)
2310 to_activate.append(dist)
2311 if dist not in req:
2312 # Oops, the "best" so far conflicts with a dependency
2313@@ -2253,10 +2268,14 @@
2314 loc = loc or self.location
2315
2316 if self.project_name == 'setuptools':
2317- if '0.7' in self.version:
2318+ try:
2319+ version = self.version
2320+ except ValueError:
2321+ version = ''
2322+ if '0.7' in version:
2323 raise ValueError(
2324 "A 0.7-series setuptools cannot be installed "
2325- "with distribute")
2326+ "with distribute. Found one at %s" % str(self.location))
2327
2328 if not loc:
2329 return
2330
2331=== modified file 'setup.py' (properties changed: +x to -x)
2332--- setup.py 2009-11-12 02:12:16 +0000
2333+++ setup.py 2010-01-19 00:05:23 +0000
2334@@ -14,9 +14,10 @@
2335 fl.process_template_line(line)
2336 dir_util.create_tree(tmp_src, fl.files)
2337 outfiles_2to3 = []
2338+ dist_script = os.path.join("build", "src", "distribute_setup.py")
2339 for f in fl.files:
2340 outf, copied = file_util.copy_file(f, os.path.join(tmp_src, f), update=1)
2341- if copied and outf.endswith(".py"):
2342+ if copied and outf.endswith(".py") and outf != dist_script:
2343 outfiles_2to3.append(outf)
2344 if copied and outf.endswith('api_tests.txt'):
2345 # XXX support this in distutils as well
2346@@ -36,7 +37,7 @@
2347 exec(open(init_path).read(), d)
2348
2349 SETUP_COMMANDS = d['__all__']
2350-VERSION = "0.6.8"
2351+VERSION = "0.6.10"
2352
2353 from setuptools import setup, find_packages
2354 from setuptools.command.build_py import build_py as _build_py
2355@@ -135,6 +136,7 @@
2356 "package_data = setuptools.dist:check_package_data",
2357 "exclude_package_data = setuptools.dist:check_package_data",
2358 "include_package_data = setuptools.dist:assert_bool",
2359+ "packages = setuptools.dist:check_packages",
2360 "dependency_links = setuptools.dist:assert_string_list",
2361 "test_loader = setuptools.dist:check_importable",
2362 "use_2to3 = setuptools.dist:assert_bool",
2363
2364=== modified file 'setuptools/archive_util.py' (properties changed: +x to -x)
2365=== modified file 'setuptools/command/__init__.py'
2366--- setuptools/command/__init__.py 2009-10-20 00:12:26 +0000
2367+++ setuptools/command/__init__.py 2010-01-19 00:05:23 +0000
2368@@ -5,13 +5,16 @@
2369 'register', 'bdist_wininst', 'upload_docs',
2370 ]
2371
2372+from setuptools.command import install_scripts
2373 import sys
2374+
2375 if sys.version>='2.5':
2376 # In Python 2.5 and above, distutils includes its own upload command
2377 __all__.remove('upload')
2378
2379 from distutils.command.bdist import bdist
2380
2381+
2382 if 'egg' not in bdist.format_commands:
2383 bdist.format_command['egg'] = ('bdist_egg', "Python .egg file")
2384 bdist.format_commands.append('egg')
2385
2386=== modified file 'setuptools/command/alias.py' (properties changed: +x to -x)
2387=== modified file 'setuptools/command/bdist_rpm.py' (properties changed: +x to -x)
2388=== modified file 'setuptools/command/bdist_wininst.py' (properties changed: +x to -x)
2389=== modified file 'setuptools/command/develop.py' (properties changed: +x to -x)
2390=== modified file 'setuptools/command/easy_install.py' (properties changed: +x to -x)
2391--- setuptools/command/easy_install.py 2009-11-12 02:12:16 +0000
2392+++ setuptools/command/easy_install.py 2010-01-19 00:05:23 +0000
2393@@ -1720,7 +1720,6 @@
2394 import setuptools; argv0 = os.path.dirname(setuptools.__path__[0])
2395 sys.argv[0] = argv0; sys.argv.append(argv0); main()
2396
2397-
2398 def main(argv=None, **kw):
2399 from setuptools import setup
2400 from setuptools.dist import Distribution
2401@@ -1745,9 +1744,16 @@
2402
2403 class DistributionWithoutHelpCommands(Distribution):
2404 common_usage = ""
2405+
2406 def _show_help(self,*args,**kw):
2407 with_ei_usage(lambda: Distribution._show_help(self,*args,**kw))
2408
2409+ def find_config_files(self):
2410+ files = Distribution.find_config_files(self)
2411+ if 'setup.cfg' in files:
2412+ files.remove('setup.cfg')
2413+ return files
2414+
2415 if argv is None:
2416 argv = sys.argv[1:]
2417
2418
2419=== modified file 'setuptools/command/egg_info.py' (properties changed: +x to -x)
2420=== modified file 'setuptools/command/install_egg_info.py' (properties changed: +x to -x)
2421=== modified file 'setuptools/command/install_scripts.py' (properties changed: +x to -x)
2422--- setuptools/command/install_scripts.py 2009-11-12 02:12:16 +0000
2423+++ setuptools/command/install_scripts.py 2010-01-19 00:05:23 +0000
2424@@ -1,6 +1,5 @@
2425 from distutils.command.install_scripts import install_scripts \
2426 as _install_scripts
2427-from easy_install import get_script_args, sys_executable, chmod
2428 from pkg_resources import Distribution, PathMetadata, ensure_directory
2429 import os
2430 from distutils import log
2431@@ -13,6 +12,9 @@
2432 self.no_ep = False
2433
2434 def run(self):
2435+ from setuptools.command.easy_install import (get_script_args,
2436+ sys_executable)
2437+
2438 self.run_command("egg_info")
2439 if self.distribution.scripts:
2440 _install_scripts.run(self) # run first to set up self.outfiles
2441@@ -37,6 +39,7 @@
2442
2443 def write_script(self, script_name, contents, mode="t", *ignored):
2444 """Write an executable file to the scripts directory"""
2445+ from setuptools.command.easy_install import chmod
2446 log.info("Installing %s script to %s", script_name, self.install_dir)
2447 target = os.path.join(self.install_dir, script_name)
2448 self.outfiles.append(target)
2449
2450=== modified file 'setuptools/command/register.py' (properties changed: +x to -x)
2451=== modified file 'setuptools/command/rotate.py' (properties changed: +x to -x)
2452=== modified file 'setuptools/command/saveopts.py' (properties changed: +x to -x)
2453=== modified file 'setuptools/command/sdist.py' (properties changed: +x to -x)
2454=== modified file 'setuptools/command/setopt.py' (properties changed: +x to -x)
2455=== modified file 'setuptools/command/upload.py' (properties changed: +x to -x)
2456=== modified file 'setuptools/command/upload_docs.py'
2457--- setuptools/command/upload_docs.py 2009-10-20 00:12:26 +0000
2458+++ setuptools/command/upload_docs.py 2010-01-19 00:05:23 +0000
2459@@ -50,7 +50,7 @@
2460 tmp_file = os.path.join(tmp_dir, "%s.zip" % name)
2461 zip_file = zipfile.ZipFile(tmp_file, "w")
2462 for root, dirs, files in os.walk(self.upload_dir):
2463- if not files:
2464+ if root == self.upload_dir and not files:
2465 raise DistutilsOptionError(
2466 "no files found in upload directory '%s'"
2467 % self.upload_dir)
2468
2469=== modified file 'setuptools/package_index.py' (properties changed: +x to -x)
2470=== modified file 'setuptools/sandbox.py' (properties changed: +x to -x)
2471--- setuptools/sandbox.py 2009-10-24 13:13:23 +0000
2472+++ setuptools/sandbox.py 2010-01-19 00:05:23 +0000
2473@@ -152,6 +152,8 @@
2474 )
2475
2476
2477+_EXCEPTIONS = [os.devnull,]
2478+
2479 class DirectorySandbox(AbstractSandbox):
2480 """Restrict operations to a single subdirectory - pseudo-chroot"""
2481
2482@@ -160,9 +162,10 @@
2483 "utime", "lchown", "chroot", "mkfifo", "mknod", "tempnam",
2484 ])
2485
2486- def __init__(self,sandbox):
2487+ def __init__(self, sandbox, exceptions=_EXCEPTIONS):
2488 self._sandbox = os.path.normcase(os.path.realpath(sandbox))
2489 self._prefix = os.path.join(self._sandbox,'')
2490+ self._exceptions = exceptions
2491 AbstractSandbox.__init__(self)
2492
2493 def _violation(self, operation, *args, **kw):
2494@@ -187,7 +190,8 @@
2495 try:
2496 self._active = False
2497 realpath = os.path.normcase(os.path.realpath(path))
2498- if realpath==self._sandbox or realpath.startswith(self._prefix):
2499+ if (realpath in self._exceptions or realpath == self._sandbox
2500+ or realpath.startswith(self._prefix)):
2501 return True
2502 finally:
2503 self._active = active
2504
2505=== modified file 'setuptools/tests/test_develop.py'
2506--- setuptools/tests/test_develop.py 2009-11-12 02:12:16 +0000
2507+++ setuptools/tests/test_develop.py 2010-01-19 00:05:23 +0000
2508@@ -20,7 +20,7 @@
2509
2510 def setUp(self):
2511 self.dir = tempfile.mkdtemp()
2512- setup = os.path.join(self.dir, SETUP_PY)
2513+ setup = os.path.join(self.dir, 'setup.py')
2514 f = open(setup, 'w')
2515 f.write(SETUP_PY)
2516 f.close()
2517
2518=== modified file 'setuptools/tests/test_easy_install.py'
2519--- setuptools/tests/test_easy_install.py 2009-11-12 02:12:16 +0000
2520+++ setuptools/tests/test_easy_install.py 2010-01-19 00:05:23 +0000
2521@@ -2,7 +2,7 @@
2522 """
2523 import sys
2524 import os, shutil, tempfile, unittest
2525-from setuptools.command.easy_install import easy_install, get_script_args
2526+from setuptools.command.easy_install import easy_install, get_script_args, main
2527 from setuptools.dist import Distribution
2528
2529 class FakeDist(object):
2530@@ -27,6 +27,12 @@
2531 )
2532 """ % sys.executable
2533
2534+SETUP_PY = """\
2535+from setuptools import setup
2536+
2537+setup(name='foo')
2538+"""
2539+
2540 class TestEasyInstallTest(unittest.TestCase):
2541
2542 def test_install_site_py(self):
2543@@ -52,3 +58,35 @@
2544
2545 self.assertEquals(script, WANTED)
2546
2547+ def test_no_setup_cfg(self):
2548+ # makes sure easy_install as a command (main)
2549+ # doesn't use a setup.cfg file that is located
2550+ # in the current working directory
2551+ dir = tempfile.mkdtemp()
2552+ setup_cfg = open(os.path.join(dir, 'setup.cfg'), 'w')
2553+ setup_cfg.write('[easy_install]\nfind_links = http://example.com')
2554+ setup_cfg.close()
2555+ setup_py = open(os.path.join(dir, 'setup.py'), 'w')
2556+ setup_py.write(SETUP_PY)
2557+ setup_py.close()
2558+
2559+ from setuptools.dist import Distribution
2560+
2561+ def _parse_command_line(self):
2562+ msg = 'Error: a local setup.cfg was used'
2563+ opts = self.command_options
2564+ if 'easy_install' in opts:
2565+ assert 'find_links' not in opts['easy_install'], msg
2566+ return self._old_parse_command_line
2567+
2568+ Distribution._old_parse_command_line = Distribution.parse_command_line
2569+ Distribution.parse_command_line = _parse_command_line
2570+
2571+ old_wd = os.getcwd()
2572+ try:
2573+ os.chdir(dir)
2574+ main([])
2575+ finally:
2576+ os.chdir(old_wd)
2577+ shutil.rmtree(dir)
2578+
2579
2580=== modified file 'setuptools/tests/test_resources.py'
2581--- setuptools/tests/test_resources.py 2009-10-24 13:13:23 +0000
2582+++ setuptools/tests/test_resources.py 2010-01-19 00:05:23 +0000
2583@@ -203,15 +203,12 @@
2584 version="0.6c9")
2585 ws.add(d2)
2586
2587-
2588-
2589-
2590-
2591-
2592-
2593-
2594-
2595-
2596+ # a unexisting version needs to work
2597+ ws = WorkingSet([])
2598+ d3 = Distribution(
2599+ "/some/path",
2600+ project_name="setuptools")
2601+ ws.add(d3)
2602
2603
2604 class EntryPointTests(TestCase):
2605@@ -536,6 +533,10 @@
2606 '#!%s -x\n' % self.non_ascii_exe)
2607
2608 def test_get_script_header_jython_workaround(self):
2609+ # This test doesn't work with Python 3 in some locales
2610+ if (sys.version_info >= (3,) and os.environ.get("LC_CTYPE")
2611+ in (None, "C", "POSIX")):
2612+ return
2613 platform = sys.platform
2614 sys.platform = 'java1.5.0_13'
2615 stdout = sys.stdout
2616
2617=== added file 'setuptools/tests/test_sandbox.py'
2618--- setuptools/tests/test_sandbox.py 1970-01-01 00:00:00 +0000
2619+++ setuptools/tests/test_sandbox.py 2010-01-19 00:05:23 +0000
2620@@ -0,0 +1,28 @@
2621+"""develop tests
2622+"""
2623+import sys
2624+import os
2625+import shutil
2626+import unittest
2627+import tempfile
2628+
2629+from setuptools.sandbox import DirectorySandbox
2630+
2631+class TestSandbox(unittest.TestCase):
2632+
2633+ def setUp(self):
2634+ self.dir = tempfile.mkdtemp()
2635+
2636+ def tearDown(self):
2637+ shutil.rmtree(self.dir)
2638+
2639+ def test_devnull(self):
2640+ sandbox = DirectorySandbox(self.dir)
2641+
2642+ def _write():
2643+ f = open(os.devnull, 'w')
2644+ f.write('xxx')
2645+ f.close()
2646+
2647+ sandbox.run(_write)
2648+
2649
2650=== added file 'setuptools/tests/test_upload_docs.py'
2651--- setuptools/tests/test_upload_docs.py 1970-01-01 00:00:00 +0000
2652+++ setuptools/tests/test_upload_docs.py 2010-01-19 00:05:23 +0000
2653@@ -0,0 +1,65 @@
2654+"""build_ext tests
2655+"""
2656+import sys, os, shutil, tempfile, unittest, site, zipfile
2657+from setuptools.command.upload_docs import upload_docs
2658+from setuptools.dist import Distribution
2659+
2660+SETUP_PY = """\
2661+from setuptools import setup
2662+
2663+setup(name='foo')
2664+"""
2665+
2666+class TestUploadDocsTest(unittest.TestCase):
2667+ def setUp(self):
2668+ self.dir = tempfile.mkdtemp()
2669+ setup = os.path.join(self.dir, 'setup.py')
2670+ f = open(setup, 'w')
2671+ f.write(SETUP_PY)
2672+ f.close()
2673+ self.old_cwd = os.getcwd()
2674+ os.chdir(self.dir)
2675+
2676+ self.upload_dir = os.path.join(self.dir, 'build')
2677+ os.mkdir(self.upload_dir)
2678+
2679+ # A test document.
2680+ f = open(os.path.join(self.upload_dir, 'index.html'), 'w')
2681+ f.write("Hello world.")
2682+ f.close()
2683+
2684+ # An empty folder.
2685+ os.mkdir(os.path.join(self.upload_dir, 'empty'))
2686+
2687+ if sys.version >= "2.6":
2688+ self.old_base = site.USER_BASE
2689+ site.USER_BASE = upload_docs.USER_BASE = tempfile.mkdtemp()
2690+ self.old_site = site.USER_SITE
2691+ site.USER_SITE = upload_docs.USER_SITE = tempfile.mkdtemp()
2692+
2693+ def tearDown(self):
2694+ os.chdir(self.old_cwd)
2695+ shutil.rmtree(self.dir)
2696+ if sys.version >= "2.6":
2697+ shutil.rmtree(site.USER_BASE)
2698+ shutil.rmtree(site.USER_SITE)
2699+ site.USER_BASE = self.old_base
2700+ site.USER_SITE = self.old_site
2701+
2702+ def test_create_zipfile(self):
2703+ # Test to make sure zipfile creation handles common cases.
2704+ # This explicitly includes a folder containing an empty folder.
2705+
2706+ dist = Distribution()
2707+
2708+ cmd = upload_docs(dist)
2709+ cmd.upload_dir = self.upload_dir
2710+ zip_file = cmd.create_zipfile()
2711+
2712+ assert zipfile.is_zipfile(zip_file)
2713+
2714+ zip_f = zipfile.ZipFile(zip_file) # woh...
2715+
2716+ assert zip_f.namelist() == ['index.html']
2717+
2718+
2719
2720=== modified file 'site.py' (properties changed: +x to -x)
2721=== modified file 'tests/shlib_test/setup.py' (properties changed: +x to -x)
2722=== modified file 'tests/shlib_test/test_hello.py' (properties changed: +x to -x)

Subscribers

People subscribed via source and target branches

to all changes: