Merge lp:~gary/zc.buildout/python-support-10 into lp:~gary/zc.buildout/python-support

Proposed by Gary Poster
Status: Merged
Merged at revision: not available
Proposed branch: lp:~gary/zc.buildout/python-support-10
Merge into: lp:~gary/zc.buildout/python-support
Diff against target: 494 lines (+136/-33)
11 files modified
CHANGES.txt (+14/-2)
bootstrap/bootstrap.py (+1/-1)
dev.py (+44/-7)
src/zc/buildout/buildout.py (+6/-1)
src/zc/buildout/buildout.txt (+1/-0)
src/zc/buildout/easy_install.py (+6/-1)
src/zc/buildout/easy_install.txt (+6/-1)
src/zc/buildout/tests.py (+42/-12)
src/zc/buildout/update.txt (+3/-2)
z3c.recipe.scripts_/src/z3c/recipe/scripts/tests.py (+3/-2)
zc.recipe.egg_/src/zc/recipe/egg/tests.py (+10/-4)
To merge this branch: bzr merge lp:~gary/zc.buildout/python-support-10
Reviewer Review Type Date Requested Status
Francis J. Lacoste (community) Approve
Review via email: mp+24387@code.launchpad.net

Description of the change

This branch fixes the two linked bugs. The fixes are in r548 (http://bazaar.launchpad.net/~gary/zc.buildout/python-support-10/revision/548).

Bug 564680 was addressed in line 1491 of easy_install.py in r548. The problem was that we were getting Distribute's custom site.py when we were making our site.py customization, and we wanted the real Python site.py. The solution was to insert a -S to the Python invocation so that site-packages were not included when we found site.py. This was a good general thing to do.

Bug 568486 was addressed in line 1614 of easy_install.py in r548. The problem was that Distribute was using a custom mechanism to know where to insert its eggs. I supplied the necessary value for the mechanism in the generated scripts (sys.__egginsert).

The revision also includes a fix for a pre-existing bug (from zc.buildout trunk) that I discovered when I tried (and succeeded) to have Launchpad use Distribute in buildout. This is line 807-808 of easy_install.py in r548. Using Distribute with the ``allow-picked-versions = false`` buildout option was causing an error because distribute translates requests for "setuptools" into requests for "distribute", but when it did this in buildout, buildout had already applied the revision constraints (what we keep in Launchpad in versions.cfg) so version constraints were not honored and buildout got confused. By doing the conversion in buildout earlier, buildout gets a chance to apply the distribute revision normally. I considered an alternate, more general approach in which buildout noticed these name changes when they happened and re-processed the revision restrictions, but I felt that it would have been an unnecessarily large change for treating this as a general behavior that I hope will not become common practice.

Figuring out a way to test all this took me awhile, but I eventually hit on the idea of making it possible to run all tests with Distribute. I changed dev.py to support this. This tests the bugs I found--if you take out my changes from r548, things fail.

Therefore, to fully test buildout now you need to run the test suite six times: the product of the setuptools implementation, Setuptools or Distribute, and the Python version, 2.4, 2.5, and 2.6. I did the six tests with this branch. Everything works except Distribute + Python 2.4. I'm simply not interested enough in that combination to pursue it.

Getting the tests to pass with Distribute took some doing, and a lot of RENormalizing. I'm going to give a quick overview of these changes in hopes it helps understanding.

A lot of the changes to the RENormalizing checkers normalize "distribute" to "setuptools" in the doctest output. That very simple normalization is there a few times for various tests (``(re.compile('distribute'), 'setuptools')``) and also we now accept "distribute" for some of the more elaborate substitutions, such as ``(re.compile('[-d] (setuptools|distribute)-[^-]+-'), 'setuptools-X-')``.

The RENormalizing change that bothered me the most was this one, which is also repeated for a few tests: ``(re.compile('\- demoneeded'), 'd demoneeded')``. I was trying to figure out why buildout with Distribute was unzipping many more eggs. Eventually I encountered this code in Distribute:

    def should_unzip(self, dist):
        if self.zip_ok is not None:
            return not self.zip_ok
        if dist.has_metadata('not-zip-safe'):
            return True
        if not dist.has_metadata('zip-safe'):
            return True
        return True

That made me laugh, but in any case, it pretty much always returns True. That's Distribute's policy (as opposed to Setuptools, where the last line would have been "return False"), and it is affecting the demoneeded package, so I kept it.

The test for upgrading setuptools was a bit trickier than simply RENormalizing because I had to create Distribute eggs instead of setuptools eggs, and make buildout support ``distribute-version``, and then make the test ignore some more useless output. That was probably the single kind of failure that had the most moving parts for me to fix.

That's pretty much it. Once this is approved, I'll merge it with my python-support branch, and then merge it with zc.buildout trunk and make a 1.5.0 beta 1 release.

Thanks!

To post a comment you must log in.
Revision history for this message
Francis J. Lacoste (flacoste) wrote :

All makes sense.

review: Approve

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 2010-03-19 14:24:54 +0000
3+++ CHANGES.txt 2010-04-29 02:12:21 +0000
4@@ -43,22 +43,34 @@
5 * The buildout script generated by bootstrap honors more of the settings
6 in the designated configuration file (e.g., buildout.cfg).
7
8+- You can develop zc.buildout using Distribute instead of Setuptools. Use
9+ the --distribute option on the dev.py script. (Releases should be tested
10+ with both Distribute and Setuptools.)
11+
12+- The ``distribute-version`` now works in the [buildout] section, mirroring
13+ the ``setuptools-version`` option (this is for consistency; using the
14+ general-purpose ``versions`` option is preferred).
15+
16 Bugs fixed:
17
18+- Using Distribute with the ``allow-picked-versions = false`` buildout
19+ option no longer causes an error.
20+
21 - The handling and documenting of default buildout options was normalized.
22 This means, among other things, that ``bin/buildout -vv`` and
23 ``bin/buildout annotate`` correctly list more of the options.
24
25 - Installing a namespace package using a Python that already has a package
26 in the same namespace (e.g., in the Python's site-packages) failed in
27- some cases.
28+ some cases. It is now handled correctly.
29
30 - Another variation of this error showed itself when at least two
31 dependencies were in a shared location like site-packages, and the
32 first one met the "versions" setting. The first dependency would be
33 added, but subsequent dependencies from the same location (e.g.,
34 site-packages) would use the version of the package found in the
35- shared location, ignoring the version setting.
36+ shared location, ignoring the version setting. This is also now
37+ handled correctly.
38
39 1.4.3 (2009-12-10)
40 ==================
41
42=== modified file 'bootstrap/bootstrap.py'
43--- bootstrap/bootstrap.py 2010-03-19 19:11:26 +0000
44+++ bootstrap/bootstrap.py 2010-04-29 02:12:21 +0000
45@@ -115,7 +115,7 @@
46
47 options, args = parser.parse_args()
48
49-# if -c was provided, we push it back into args for buildout' main function
50+# if -c was provided, we push it back into args for buildout's main function
51 if options.config_file is not None:
52 args += ['-c', options.config_file]
53
54
55=== modified file 'dev.py'
56--- dev.py 2010-03-19 19:11:26 +0000
57+++ dev.py 2010-04-29 02:12:21 +0000
58@@ -20,6 +20,7 @@
59 """
60
61 import os, shutil, sys, subprocess, urllib2
62+from optparse import OptionParser
63
64 if sys.platform == 'win32':
65 def quote(c):
66@@ -56,10 +57,36 @@
67
68 is_jython = sys.platform.startswith('java')
69
70+setuptools_source = 'http://peak.telecommunity.com/dist/ez_setup.py'
71+distribute_source = 'http://python-distribute.org/distribute_setup.py'
72+
73+usage = '''\
74+[DESIRED PYTHON FOR DEVELOPING BUILDOUT] dev.py [options]
75+
76+Bootstraps buildout itself for development.
77+
78+This is different from a normal bootstrapping process because the
79+buildout egg itself is installed as a develop egg.
80+'''
81+
82+parser = OptionParser(usage=usage)
83+parser.add_option("-d", "--distribute",
84+ action="store_true", dest="use_distribute", default=False,
85+ help="Use Distribute rather than Setuptools.")
86+
87+options, args = parser.parse_args()
88+
89+if args:
90+ parser.error('This script accepts no arguments other than its options.')
91+
92+if options.use_distribute:
93+ setup_source = distribute_source
94+else:
95+ setup_source = setuptools_source
96+
97 for d in 'eggs', 'develop-eggs', 'bin':
98 if not os.path.exists(d):
99 os.mkdir(d)
100-
101 if os.path.isdir('build'):
102 shutil.rmtree('build')
103
104@@ -67,22 +94,32 @@
105 to_reload = False
106 import pkg_resources
107 to_reload = True
108+ if not hasattr(pkg_resources, '_distribute'):
109+ raise ImportError
110 import setuptools # A flag. Sometimes pkg_resources is installed alone.
111 except ImportError:
112+ ez_code = urllib2.urlopen(setup_source).read().replace('\r\n', '\n')
113 ez = {}
114- exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
115- ).read() in ez
116- ez['use_setuptools'](to_dir='eggs', download_delay=0)
117-
118- import pkg_resources
119+ exec ez_code in ez
120+ setup_args = dict(to_dir='eggs', download_delay=0)
121+ if options.use_distribute:
122+ setup_args['no_fake'] = True
123+ ez['use_setuptools'](**setup_args)
124 if to_reload:
125 reload(pkg_resources)
126+ else:
127+ import pkg_resources
128+ # This does not (always?) update the default working set. We will
129+ # do it.
130+ for path in sys.path:
131+ if path not in pkg_resources.working_set.entries:
132+ pkg_resources.working_set.add_entry(path)
133
134 env = os.environ.copy() # Windows needs yet-to-be-determined values from this.
135 env['PYTHONPATH'] = os.path.dirname(pkg_resources.__file__)
136 subprocess.Popen(
137 [sys.executable] +
138- ['-S', 'setup.py', '-q', 'develop', '-m', '-x', '-d', 'develop-eggs'],
139+ ['setup.py', '-q', 'develop', '-m', '-x', '-d', 'develop-eggs'],
140 env=env).wait()
141
142 pkg_resources.working_set.add_entry('src')
143
144=== modified file 'src/zc/buildout/buildout.py'
145--- src/zc/buildout/buildout.py 2010-04-19 18:50:51 +0000
146+++ src/zc/buildout/buildout.py 2010-04-29 02:12:21 +0000
147@@ -858,10 +858,15 @@
148
149 options = self['buildout']
150
151+ specs = ['zc.buildout']
152+ if zc.buildout.easy_install.is_distribute:
153+ specs.append('distribute')
154+ else:
155+ specs.append('setuptools')
156 ws = zc.buildout.easy_install.install(
157 [
158 (spec + ' ' + options.get(spec+'-version', '')).strip()
159- for spec in ('zc.buildout', 'setuptools')
160+ for spec in specs
161 ],
162 options['eggs-directory'],
163 links = options.get('find-links', '').split(),
164
165=== modified file 'src/zc/buildout/buildout.txt'
166--- src/zc/buildout/buildout.txt 2010-04-19 18:50:51 +0000
167+++ src/zc/buildout/buildout.txt 2010-04-29 02:12:21 +0000
168@@ -770,6 +770,7 @@
169 relative-paths= false
170 DEFAULT_VALUE
171 socket-timeout=
172+ DEFAULT_VALUE
173 unzip= false
174 DEFAULT_VALUE
175 use-dependency-links= true
176
177=== modified file 'src/zc/buildout/easy_install.py'
178--- src/zc/buildout/easy_install.py 2010-04-19 18:50:51 +0000
179+++ src/zc/buildout/easy_install.py 2010-04-29 02:12:21 +0000
180@@ -51,6 +51,8 @@
181
182 is_win32 = sys.platform == 'win32'
183 is_jython = sys.platform.startswith('java')
184+is_distribute = (
185+ pkg_resources.Requirement.parse('setuptools').key=='distribute')
186
187 if is_jython:
188 import java.lang.System
189@@ -802,6 +804,8 @@
190
191
192 def _constrain(self, requirement):
193+ if is_distribute and requirement.key == 'setuptools':
194+ requirement = pkg_resources.Requirement.parse('distribute')
195 version = self._versions.get(requirement.project_name)
196 if version:
197 if version not in requirement:
198@@ -1484,7 +1488,7 @@
199 - executable is a path to the desired Python executable.
200 - name is the name of the (pure, not C) Python module.
201 """
202- cmd = [executable, "-c",
203+ cmd = [executable, "-Sc",
204 "import imp; "
205 "fp, path, desc = imp.find_module(%r); "
206 "fp.close; "
207@@ -1607,6 +1611,7 @@
208 pkg_resources.working_set.add_entry(sitedir)'''
209
210 original_path_snippet = '''
211+ sys.__egginsert = len(buildout_paths) # Support distribute.
212 original_paths = [
213 %s
214 ]
215
216=== modified file 'src/zc/buildout/easy_install.txt'
217--- src/zc/buildout/easy_install.txt 2010-04-19 17:31:35 +0000
218+++ src/zc/buildout/easy_install.txt 2010-04-29 02:12:21 +0000
219@@ -222,7 +222,9 @@
220 d other-1.0-py2.4.egg
221
222 We can request that eggs be unzipped even if they are zip safe. This
223-can be useful when debugging.
224+can be useful when debugging. (Note that Distribute will unzip eggs by
225+default, so if you are using Distribute, most or all eggs will already be
226+unzipped without this flag.)
227
228 >>> rmdir(dest)
229 >>> dest = tmpdir('sample-install')
230@@ -1284,6 +1286,7 @@
231 if not sitedircase in known_paths and os.path.exists(sitedir):
232 sys.path.append(sitedir)
233 known_paths.add(sitedircase)
234+ sys.__egginsert = len(buildout_paths) # Support distribute.
235 original_paths = [
236 ...
237 ]
238@@ -1360,6 +1363,7 @@
239 sys.path.append(sitedir)
240 known_paths.add(sitedircase)
241 pkg_resources.working_set.add_entry(sitedir)
242+ sys.__egginsert = len(buildout_paths) # Support distribute.
243 original_paths = [
244 ...
245 ]
246@@ -1423,6 +1427,7 @@
247 sys.path.append(sitedir)
248 known_paths.add(sitedircase)
249 pkg_resources.working_set.add_entry(sitedir)
250+ sys.__egginsert = len(buildout_paths) # Support distribute.
251 original_paths = [
252 ...
253 ]
254
255=== modified file 'src/zc/buildout/tests.py'
256--- src/zc/buildout/tests.py 2010-03-19 19:14:02 +0000
257+++ src/zc/buildout/tests.py 2010-04-29 02:12:21 +0000
258@@ -864,7 +864,8 @@
259 - z3c.recipe.scripts.egg-link
260 - zc.recipe.egg.egg-link
261
262- >>> ls('eggs') # doctest: +ELLIPSIS
263+ >>> print 'START ->'; ls('eggs') # doctest: +ELLIPSIS
264+ START...
265 - foox-0.0.0-py2.4.egg
266 ...
267
268@@ -3103,6 +3104,13 @@
269 >>> write('foo.py', '')
270 >>> _ = system(buildout+' setup . sdist')
271
272+ >>> if zc.buildout.easy_install.is_distribute:
273+ ... distribute_version = 'distribute = %s' % (
274+ ... pkg_resources.working_set.find(
275+ ... pkg_resources.Requirement.parse('distribute')).version,)
276+ ... else:
277+ ... distribute_version = ''
278+ ...
279 >>> write('buildout.cfg',
280 ... '''
281 ... [buildout]
282@@ -3114,12 +3122,14 @@
283 ... [versions]
284 ... setuptools = %s
285 ... foo = 1
286+ ... %s
287 ...
288 ... [foo]
289 ... recipe = zc.recipe.egg
290 ... eggs = foo
291- ... ''' % pkg_resources.working_set.find(
292- ... pkg_resources.Requirement.parse('setuptools')).version)
293+ ... ''' % (pkg_resources.working_set.find(
294+ ... pkg_resources.Requirement.parse('setuptools')).version,
295+ ... distribute_version))
296
297 >>> print system(buildout),
298 Installing foo.
299@@ -3623,11 +3633,13 @@
300
301 # now let's make the new releases
302 makeNewRelease('zc.buildout', ws, new_releases)
303- makeNewRelease('setuptools', ws, new_releases)
304-
305 os.mkdir(os.path.join(new_releases, 'zc.buildout'))
306- os.mkdir(os.path.join(new_releases, 'setuptools'))
307-
308+ if zc.buildout.easy_install.is_distribute:
309+ makeNewRelease('distribute', ws, new_releases)
310+ os.mkdir(os.path.join(new_releases, 'distribute'))
311+ else:
312+ makeNewRelease('setuptools', ws, new_releases)
313+ os.mkdir(os.path.join(new_releases, 'setuptools'))
314
315
316 normalize_bang = (
317@@ -3651,7 +3663,8 @@
318 '__buildout_signature__ = recipes-SSSSSSSSSSS'),
319 (re.compile('executable = [\S ]+python\S*', re.I),
320 'executable = python'),
321- (re.compile('[-d] setuptools-\S+[.]egg'), 'setuptools.egg'),
322+ (re.compile('[-d] (setuptools|distribute)-\S+[.]egg'),
323+ 'setuptools.egg'),
324 (re.compile('zc.buildout(-\S+)?[.]egg(-link)?'),
325 'zc.buildout.egg'),
326 (re.compile('creating \S*setup.cfg'), 'creating setup.cfg'),
327@@ -3666,6 +3679,7 @@
328 r'when that file already exists: '),
329 '[Errno 17] File exists: '
330 ),
331+ (re.compile('distribute'), 'setuptools'),
332 ])
333 ),
334 doctest.DocFileSuite(
335@@ -3695,9 +3709,18 @@
336 (re.compile('(zc.buildout|setuptools)-\d+[.]\d+\S*'
337 '-py\d.\d.egg'),
338 '\\1.egg'),
339+ (re.compile('distribute-\d+[.]\d+\S*'
340+ '-py\d.\d.egg'),
341+ 'setuptools.egg'),
342 (re.compile('(zc.buildout|setuptools)( version)? \d+[.]\d+\S*'),
343 '\\1 V.V'),
344- (re.compile('[-d] setuptools'), '- setuptools'),
345+ (re.compile('distribute( version)? \d+[.]\d+\S*'),
346+ 'setuptools V.V'),
347+ (re.compile('[-d] (setuptools|distribute)'), '- setuptools'),
348+ (re.compile('distribute'), 'setuptools'),
349+ (re.compile("\nUnused options for buildout: "
350+ "'(distribute|setuptools)\-version'\."),
351+ '')
352 ])
353 ),
354
355@@ -3713,13 +3736,17 @@
356 zc.buildout.testing.normalize_egg_py,
357 normalize_bang,
358 (re.compile('extdemo[.]pyd'), 'extdemo.so'),
359- (re.compile('[-d] setuptools-\S+[.]egg'), 'setuptools.egg'),
360+ (re.compile('[-d] (setuptools|distribute)-\S+[.]egg'),
361+ 'setuptools.egg'),
362 (re.compile(r'\\[\\]?'), '/'),
363 (re.compile(r'\#!\S+\bpython\S*'), '#!/usr/bin/python'),
364 # Normalize generate_script's Windows interpreter to UNIX:
365 (re.compile(r'\nimport subprocess\n'), '\n'),
366 (re.compile('subprocess\\.call\\(argv, env=environ\\)'),
367 'os.execve(sys.executable, argv, environ)'),
368+ (re.compile('distribute'), 'setuptools'),
369+ # Distribute unzips eggs by default.
370+ (re.compile('\- demoneeded'), 'd demoneeded'),
371 ]+(sys.version_info < (2, 5) and [
372 (re.compile('.*No module named runpy.*', re.S), ''),
373 (re.compile('.*usage: pdb.py scriptfile .*', re.S), ''),
374@@ -3751,7 +3778,7 @@
375 zc.buildout.testing.normalize_egg_py,
376 (re.compile("buildout: Running \S*setup.py"),
377 'buildout: Running setup.py'),
378- (re.compile('setuptools-\S+-'),
379+ (re.compile('(setuptools|distribute)-\S+-'),
380 'setuptools.egg'),
381 (re.compile('zc.buildout-\S+-'),
382 'zc.buildout.egg'),
383@@ -3759,7 +3786,7 @@
384 'File "one.py"'),
385 (re.compile(r'We have a develop egg: (\S+) (\S+)'),
386 r'We have a develop egg: \1 V'),
387- (re.compile('Picked: setuptools = \S+'),
388+ (re.compile('Picked: (setuptools|distribute) = \S+'),
389 'Picked: setuptools = V'),
390 (re.compile(r'\\[\\]?'), '/'),
391 (re.compile(
392@@ -3770,6 +3797,9 @@
393 # for bug_92891_bootstrap_crashes_with_egg_recipe_in_buildout_section
394 (re.compile(r"Unused options for buildout: 'eggs' 'scripts'\."),
395 "Unused options for buildout: 'scripts' 'eggs'."),
396+ (re.compile('distribute'), 'setuptools'),
397+ # Distribute unzips eggs by default.
398+ (re.compile('\- demoneeded'), 'd demoneeded'),
399 ]),
400 ),
401 zc.buildout.testselectingpython.test_suite(),
402
403=== modified file 'src/zc/buildout/update.txt'
404--- src/zc/buildout/update.txt 2010-03-19 01:39:01 +0000
405+++ src/zc/buildout/update.txt 2010-04-29 02:12:21 +0000
406@@ -100,8 +100,8 @@
407 ...
408
409 Now, let's recreate the sample buildout. If we specify constraints on
410-the versions of zc.buildout and setuptools to use, running the
411-buildout will install earlier versions of these packages:
412+the versions of zc.buildout and setuptools (or distribute) to use,
413+running the buildout will install earlier versions of these packages:
414
415 >>> write(sample_buildout, 'buildout.cfg',
416 ... """
417@@ -112,6 +112,7 @@
418 ... develop = showversions
419 ... zc.buildout-version = < 99
420 ... setuptools-version = < 99
421+ ... distribute-version = < 99
422 ...
423 ... [show-versions]
424 ... recipe = showversions
425
426=== modified file 'z3c.recipe.scripts_/src/z3c/recipe/scripts/tests.py'
427--- z3c.recipe.scripts_/src/z3c/recipe/scripts/tests.py 2010-02-24 15:52:10 +0000
428+++ z3c.recipe.scripts_/src/z3c/recipe/scripts/tests.py 2010-04-29 02:12:21 +0000
429@@ -423,8 +423,8 @@
430 zc.buildout.tests.normalize_bang,
431 (re.compile(r'zc.buildout(-\S+)?[.]egg(-link)?'),
432 'zc.buildout.egg'),
433- (re.compile('[-d] setuptools-[^-]+-'), 'setuptools-X-'),
434- (re.compile(r'setuptools-[\w.]+-py'), 'setuptools-X-py'),
435+ (re.compile('[-d] (setuptools|distribute)-[^-]+-'), 'setuptools-X-'),
436+ (re.compile(r'(setuptools|distribute)-[\w.]+-py'), 'setuptools-X-py'),
437 (re.compile(r'eggs\\\\demo'), 'eggs/demo'),
438 (re.compile(r'[a-zA-Z]:\\\\foo\\\\bar'), '/foo/bar'),
439 (re.compile(r'\#!\S+\bpython\S*'), '#!/usr/bin/python'),
440@@ -432,6 +432,7 @@
441 (re.compile(r'\nimport subprocess\n'), '\n'),
442 (re.compile('subprocess\\.call\\(argv, env=environ\\)'),
443 'os.execve(sys.executable, argv, environ)'),
444+ (re.compile('distribute'), 'setuptools'),
445 ])
446 ),
447 doctest.DocTestSuite(
448
449=== modified file 'zc.recipe.egg_/src/zc/recipe/egg/tests.py'
450--- zc.recipe.egg_/src/zc/recipe/egg/tests.py 2010-03-19 14:24:54 +0000
451+++ zc.recipe.egg_/src/zc/recipe/egg/tests.py 2010-04-29 02:12:21 +0000
452@@ -50,9 +50,12 @@
453 zc.buildout.tests.normalize_bang,
454 (re.compile('zc.buildout(-\S+)?[.]egg(-link)?'),
455 'zc.buildout.egg'),
456- (re.compile('[-d] setuptools-[^-]+-'), 'setuptools-X-'),
457+ (re.compile('[-d] (setuptools|distribute)-[^-]+-'),
458+ 'setuptools-X-'),
459 (re.compile(r'eggs\\\\demo'), 'eggs/demo'),
460 (re.compile(r'[a-zA-Z]:\\\\foo\\\\bar'), '/foo/bar'),
461+ # Distribute unzips eggs by default.
462+ (re.compile('\- demoneeded'), 'd demoneeded'),
463 ])
464 ),
465 doctest.DocFileSuite(
466@@ -64,7 +67,7 @@
467 (re.compile('__buildout_signature__ = '
468 'sample-\S+\s+'
469 'zc.recipe.egg-\S+\s+'
470- 'setuptools-\S+\s+'
471+ '(setuptools|distribute)-\S+\s+'
472 'zc.buildout-\S+\s*'
473 ),
474 '__buildout_signature__ = sample- zc.recipe.egg-\n'),
475@@ -104,14 +107,17 @@
476 zc.buildout.testing.normalize_path,
477 zc.buildout.testing.normalize_endings,
478 zc.buildout.testing.normalize_script,
479- (re.compile('Got setuptools \S+'), 'Got setuptools V'),
480- (re.compile('([d-] )?setuptools-\S+-py'),
481+ (re.compile('Got (setuptools|distribute) \S+'),
482+ 'Got setuptools V'),
483+ (re.compile('([d-] )?(setuptools|distribute)-\S+-py'),
484 'setuptools-V-py'),
485 (re.compile('-py2[.][0-35-9][.]'), 'py2.5.'),
486 (re.compile('zc.buildout-\S+[.]egg'),
487 'zc.buildout.egg'),
488 (re.compile('zc.buildout[.]egg-link'),
489 'zc.buildout.egg'),
490+ # Distribute unzips eggs by default.
491+ (re.compile('\- demoneeded'), 'd demoneeded'),
492 ]),
493 ),
494 )

Subscribers

People subscribed via source and target branches

to all changes: