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
=== modified file 'CHANGES.txt'
--- CHANGES.txt 2010-03-19 14:24:54 +0000
+++ CHANGES.txt 2010-04-29 02:12:21 +0000
@@ -43,22 +43,34 @@
43 * The buildout script generated by bootstrap honors more of the settings43 * The buildout script generated by bootstrap honors more of the settings
44 in the designated configuration file (e.g., buildout.cfg).44 in the designated configuration file (e.g., buildout.cfg).
4545
46- You can develop zc.buildout using Distribute instead of Setuptools. Use
47 the --distribute option on the dev.py script. (Releases should be tested
48 with both Distribute and Setuptools.)
49
50- The ``distribute-version`` now works in the [buildout] section, mirroring
51 the ``setuptools-version`` option (this is for consistency; using the
52 general-purpose ``versions`` option is preferred).
53
46Bugs fixed:54Bugs fixed:
4755
56- Using Distribute with the ``allow-picked-versions = false`` buildout
57 option no longer causes an error.
58
48- The handling and documenting of default buildout options was normalized.59- The handling and documenting of default buildout options was normalized.
49 This means, among other things, that ``bin/buildout -vv`` and60 This means, among other things, that ``bin/buildout -vv`` and
50 ``bin/buildout annotate`` correctly list more of the options.61 ``bin/buildout annotate`` correctly list more of the options.
5162
52- Installing a namespace package using a Python that already has a package63- Installing a namespace package using a Python that already has a package
53 in the same namespace (e.g., in the Python's site-packages) failed in64 in the same namespace (e.g., in the Python's site-packages) failed in
54 some cases.65 some cases. It is now handled correctly.
5566
56- Another variation of this error showed itself when at least two67- Another variation of this error showed itself when at least two
57 dependencies were in a shared location like site-packages, and the68 dependencies were in a shared location like site-packages, and the
58 first one met the "versions" setting. The first dependency would be69 first one met the "versions" setting. The first dependency would be
59 added, but subsequent dependencies from the same location (e.g.,70 added, but subsequent dependencies from the same location (e.g.,
60 site-packages) would use the version of the package found in the71 site-packages) would use the version of the package found in the
61 shared location, ignoring the version setting.72 shared location, ignoring the version setting. This is also now
73 handled correctly.
6274
631.4.3 (2009-12-10)751.4.3 (2009-12-10)
64==================76==================
6577
=== modified file 'bootstrap/bootstrap.py'
--- bootstrap/bootstrap.py 2010-03-19 19:11:26 +0000
+++ bootstrap/bootstrap.py 2010-04-29 02:12:21 +0000
@@ -115,7 +115,7 @@
115115
116options, args = parser.parse_args()116options, args = parser.parse_args()
117117
118# if -c was provided, we push it back into args for buildout' main function118# if -c was provided, we push it back into args for buildout's main function
119if options.config_file is not None:119if options.config_file is not None:
120 args += ['-c', options.config_file]120 args += ['-c', options.config_file]
121121
122122
=== modified file 'dev.py'
--- dev.py 2010-03-19 19:11:26 +0000
+++ dev.py 2010-04-29 02:12:21 +0000
@@ -20,6 +20,7 @@
20"""20"""
2121
22import os, shutil, sys, subprocess, urllib222import os, shutil, sys, subprocess, urllib2
23from optparse import OptionParser
2324
24if sys.platform == 'win32':25if sys.platform == 'win32':
25 def quote(c):26 def quote(c):
@@ -56,10 +57,36 @@
5657
57is_jython = sys.platform.startswith('java')58is_jython = sys.platform.startswith('java')
5859
60setuptools_source = 'http://peak.telecommunity.com/dist/ez_setup.py'
61distribute_source = 'http://python-distribute.org/distribute_setup.py'
62
63usage = '''\
64[DESIRED PYTHON FOR DEVELOPING BUILDOUT] dev.py [options]
65
66Bootstraps buildout itself for development.
67
68This is different from a normal bootstrapping process because the
69buildout egg itself is installed as a develop egg.
70'''
71
72parser = OptionParser(usage=usage)
73parser.add_option("-d", "--distribute",
74 action="store_true", dest="use_distribute", default=False,
75 help="Use Distribute rather than Setuptools.")
76
77options, args = parser.parse_args()
78
79if args:
80 parser.error('This script accepts no arguments other than its options.')
81
82if options.use_distribute:
83 setup_source = distribute_source
84else:
85 setup_source = setuptools_source
86
59for d in 'eggs', 'develop-eggs', 'bin':87for d in 'eggs', 'develop-eggs', 'bin':
60 if not os.path.exists(d):88 if not os.path.exists(d):
61 os.mkdir(d)89 os.mkdir(d)
62
63if os.path.isdir('build'):90if os.path.isdir('build'):
64 shutil.rmtree('build')91 shutil.rmtree('build')
6592
@@ -67,22 +94,32 @@
67 to_reload = False94 to_reload = False
68 import pkg_resources95 import pkg_resources
69 to_reload = True96 to_reload = True
97 if not hasattr(pkg_resources, '_distribute'):
98 raise ImportError
70 import setuptools # A flag. Sometimes pkg_resources is installed alone.99 import setuptools # A flag. Sometimes pkg_resources is installed alone.
71except ImportError:100except ImportError:
101 ez_code = urllib2.urlopen(setup_source).read().replace('\r\n', '\n')
72 ez = {}102 ez = {}
73 exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'103 exec ez_code in ez
74 ).read() in ez104 setup_args = dict(to_dir='eggs', download_delay=0)
75 ez['use_setuptools'](to_dir='eggs', download_delay=0)105 if options.use_distribute:
76106 setup_args['no_fake'] = True
77 import pkg_resources107 ez['use_setuptools'](**setup_args)
78 if to_reload:108 if to_reload:
79 reload(pkg_resources)109 reload(pkg_resources)
110 else:
111 import pkg_resources
112 # This does not (always?) update the default working set. We will
113 # do it.
114 for path in sys.path:
115 if path not in pkg_resources.working_set.entries:
116 pkg_resources.working_set.add_entry(path)
80117
81env = os.environ.copy() # Windows needs yet-to-be-determined values from this.118env = os.environ.copy() # Windows needs yet-to-be-determined values from this.
82env['PYTHONPATH'] = os.path.dirname(pkg_resources.__file__)119env['PYTHONPATH'] = os.path.dirname(pkg_resources.__file__)
83subprocess.Popen(120subprocess.Popen(
84 [sys.executable] +121 [sys.executable] +
85 ['-S', 'setup.py', '-q', 'develop', '-m', '-x', '-d', 'develop-eggs'],122 ['setup.py', '-q', 'develop', '-m', '-x', '-d', 'develop-eggs'],
86 env=env).wait()123 env=env).wait()
87124
88pkg_resources.working_set.add_entry('src')125pkg_resources.working_set.add_entry('src')
89126
=== modified file 'src/zc/buildout/buildout.py'
--- src/zc/buildout/buildout.py 2010-04-19 18:50:51 +0000
+++ src/zc/buildout/buildout.py 2010-04-29 02:12:21 +0000
@@ -858,10 +858,15 @@
858858
859 options = self['buildout']859 options = self['buildout']
860860
861 specs = ['zc.buildout']
862 if zc.buildout.easy_install.is_distribute:
863 specs.append('distribute')
864 else:
865 specs.append('setuptools')
861 ws = zc.buildout.easy_install.install(866 ws = zc.buildout.easy_install.install(
862 [867 [
863 (spec + ' ' + options.get(spec+'-version', '')).strip()868 (spec + ' ' + options.get(spec+'-version', '')).strip()
864 for spec in ('zc.buildout', 'setuptools')869 for spec in specs
865 ],870 ],
866 options['eggs-directory'],871 options['eggs-directory'],
867 links = options.get('find-links', '').split(),872 links = options.get('find-links', '').split(),
868873
=== modified file 'src/zc/buildout/buildout.txt'
--- src/zc/buildout/buildout.txt 2010-04-19 18:50:51 +0000
+++ src/zc/buildout/buildout.txt 2010-04-29 02:12:21 +0000
@@ -770,6 +770,7 @@
770 relative-paths= false770 relative-paths= false
771 DEFAULT_VALUE771 DEFAULT_VALUE
772 socket-timeout=772 socket-timeout=
773 DEFAULT_VALUE
773 unzip= false774 unzip= false
774 DEFAULT_VALUE775 DEFAULT_VALUE
775 use-dependency-links= true776 use-dependency-links= true
776777
=== modified file 'src/zc/buildout/easy_install.py'
--- src/zc/buildout/easy_install.py 2010-04-19 18:50:51 +0000
+++ src/zc/buildout/easy_install.py 2010-04-29 02:12:21 +0000
@@ -51,6 +51,8 @@
5151
52is_win32 = sys.platform == 'win32'52is_win32 = sys.platform == 'win32'
53is_jython = sys.platform.startswith('java')53is_jython = sys.platform.startswith('java')
54is_distribute = (
55 pkg_resources.Requirement.parse('setuptools').key=='distribute')
5456
55if is_jython:57if is_jython:
56 import java.lang.System58 import java.lang.System
@@ -802,6 +804,8 @@
802804
803805
804 def _constrain(self, requirement):806 def _constrain(self, requirement):
807 if is_distribute and requirement.key == 'setuptools':
808 requirement = pkg_resources.Requirement.parse('distribute')
805 version = self._versions.get(requirement.project_name)809 version = self._versions.get(requirement.project_name)
806 if version:810 if version:
807 if version not in requirement:811 if version not in requirement:
@@ -1484,7 +1488,7 @@
1484 - executable is a path to the desired Python executable.1488 - executable is a path to the desired Python executable.
1485 - name is the name of the (pure, not C) Python module.1489 - name is the name of the (pure, not C) Python module.
1486 """1490 """
1487 cmd = [executable, "-c",1491 cmd = [executable, "-Sc",
1488 "import imp; "1492 "import imp; "
1489 "fp, path, desc = imp.find_module(%r); "1493 "fp, path, desc = imp.find_module(%r); "
1490 "fp.close; "1494 "fp.close; "
@@ -1607,6 +1611,7 @@
1607 pkg_resources.working_set.add_entry(sitedir)'''1611 pkg_resources.working_set.add_entry(sitedir)'''
16081612
1609original_path_snippet = '''1613original_path_snippet = '''
1614 sys.__egginsert = len(buildout_paths) # Support distribute.
1610 original_paths = [1615 original_paths = [
1611 %s1616 %s
1612 ]1617 ]
16131618
=== modified file 'src/zc/buildout/easy_install.txt'
--- src/zc/buildout/easy_install.txt 2010-04-19 17:31:35 +0000
+++ src/zc/buildout/easy_install.txt 2010-04-29 02:12:21 +0000
@@ -222,7 +222,9 @@
222 d other-1.0-py2.4.egg222 d other-1.0-py2.4.egg
223223
224We can request that eggs be unzipped even if they are zip safe. This224We can request that eggs be unzipped even if they are zip safe. This
225can be useful when debugging.225can be useful when debugging. (Note that Distribute will unzip eggs by
226default, so if you are using Distribute, most or all eggs will already be
227unzipped without this flag.)
226228
227 >>> rmdir(dest)229 >>> rmdir(dest)
228 >>> dest = tmpdir('sample-install')230 >>> dest = tmpdir('sample-install')
@@ -1284,6 +1286,7 @@
1284 if not sitedircase in known_paths and os.path.exists(sitedir):1286 if not sitedircase in known_paths and os.path.exists(sitedir):
1285 sys.path.append(sitedir)1287 sys.path.append(sitedir)
1286 known_paths.add(sitedircase)1288 known_paths.add(sitedircase)
1289 sys.__egginsert = len(buildout_paths) # Support distribute.
1287 original_paths = [1290 original_paths = [
1288 ...1291 ...
1289 ]1292 ]
@@ -1360,6 +1363,7 @@
1360 sys.path.append(sitedir)1363 sys.path.append(sitedir)
1361 known_paths.add(sitedircase)1364 known_paths.add(sitedircase)
1362 pkg_resources.working_set.add_entry(sitedir)1365 pkg_resources.working_set.add_entry(sitedir)
1366 sys.__egginsert = len(buildout_paths) # Support distribute.
1363 original_paths = [1367 original_paths = [
1364 ...1368 ...
1365 ]1369 ]
@@ -1423,6 +1427,7 @@
1423 sys.path.append(sitedir)1427 sys.path.append(sitedir)
1424 known_paths.add(sitedircase)1428 known_paths.add(sitedircase)
1425 pkg_resources.working_set.add_entry(sitedir)1429 pkg_resources.working_set.add_entry(sitedir)
1430 sys.__egginsert = len(buildout_paths) # Support distribute.
1426 original_paths = [1431 original_paths = [
1427 ...1432 ...
1428 ]1433 ]
14291434
=== modified file 'src/zc/buildout/tests.py'
--- src/zc/buildout/tests.py 2010-03-19 19:14:02 +0000
+++ src/zc/buildout/tests.py 2010-04-29 02:12:21 +0000
@@ -864,7 +864,8 @@
864 - z3c.recipe.scripts.egg-link864 - z3c.recipe.scripts.egg-link
865 - zc.recipe.egg.egg-link865 - zc.recipe.egg.egg-link
866866
867 >>> ls('eggs') # doctest: +ELLIPSIS867 >>> print 'START ->'; ls('eggs') # doctest: +ELLIPSIS
868 START...
868 - foox-0.0.0-py2.4.egg869 - foox-0.0.0-py2.4.egg
869 ...870 ...
870871
@@ -3103,6 +3104,13 @@
3103 >>> write('foo.py', '')3104 >>> write('foo.py', '')
3104 >>> _ = system(buildout+' setup . sdist')3105 >>> _ = system(buildout+' setup . sdist')
31053106
3107 >>> if zc.buildout.easy_install.is_distribute:
3108 ... distribute_version = 'distribute = %s' % (
3109 ... pkg_resources.working_set.find(
3110 ... pkg_resources.Requirement.parse('distribute')).version,)
3111 ... else:
3112 ... distribute_version = ''
3113 ...
3106 >>> write('buildout.cfg',3114 >>> write('buildout.cfg',
3107 ... '''3115 ... '''
3108 ... [buildout]3116 ... [buildout]
@@ -3114,12 +3122,14 @@
3114 ... [versions]3122 ... [versions]
3115 ... setuptools = %s3123 ... setuptools = %s
3116 ... foo = 13124 ... foo = 1
3125 ... %s
3117 ...3126 ...
3118 ... [foo]3127 ... [foo]
3119 ... recipe = zc.recipe.egg3128 ... recipe = zc.recipe.egg
3120 ... eggs = foo3129 ... eggs = foo
3121 ... ''' % pkg_resources.working_set.find(3130 ... ''' % (pkg_resources.working_set.find(
3122 ... pkg_resources.Requirement.parse('setuptools')).version)3131 ... pkg_resources.Requirement.parse('setuptools')).version,
3132 ... distribute_version))
31233133
3124 >>> print system(buildout),3134 >>> print system(buildout),
3125 Installing foo.3135 Installing foo.
@@ -3623,11 +3633,13 @@
36233633
3624 # now let's make the new releases3634 # now let's make the new releases
3625 makeNewRelease('zc.buildout', ws, new_releases)3635 makeNewRelease('zc.buildout', ws, new_releases)
3626 makeNewRelease('setuptools', ws, new_releases)
3627
3628 os.mkdir(os.path.join(new_releases, 'zc.buildout'))3636 os.mkdir(os.path.join(new_releases, 'zc.buildout'))
3629 os.mkdir(os.path.join(new_releases, 'setuptools'))3637 if zc.buildout.easy_install.is_distribute:
36303638 makeNewRelease('distribute', ws, new_releases)
3639 os.mkdir(os.path.join(new_releases, 'distribute'))
3640 else:
3641 makeNewRelease('setuptools', ws, new_releases)
3642 os.mkdir(os.path.join(new_releases, 'setuptools'))
36313643
36323644
3633normalize_bang = (3645normalize_bang = (
@@ -3651,7 +3663,8 @@
3651 '__buildout_signature__ = recipes-SSSSSSSSSSS'),3663 '__buildout_signature__ = recipes-SSSSSSSSSSS'),
3652 (re.compile('executable = [\S ]+python\S*', re.I),3664 (re.compile('executable = [\S ]+python\S*', re.I),
3653 'executable = python'),3665 'executable = python'),
3654 (re.compile('[-d] setuptools-\S+[.]egg'), 'setuptools.egg'),3666 (re.compile('[-d] (setuptools|distribute)-\S+[.]egg'),
3667 'setuptools.egg'),
3655 (re.compile('zc.buildout(-\S+)?[.]egg(-link)?'),3668 (re.compile('zc.buildout(-\S+)?[.]egg(-link)?'),
3656 'zc.buildout.egg'),3669 'zc.buildout.egg'),
3657 (re.compile('creating \S*setup.cfg'), 'creating setup.cfg'),3670 (re.compile('creating \S*setup.cfg'), 'creating setup.cfg'),
@@ -3666,6 +3679,7 @@
3666 r'when that file already exists: '),3679 r'when that file already exists: '),
3667 '[Errno 17] File exists: '3680 '[Errno 17] File exists: '
3668 ),3681 ),
3682 (re.compile('distribute'), 'setuptools'),
3669 ])3683 ])
3670 ),3684 ),
3671 doctest.DocFileSuite(3685 doctest.DocFileSuite(
@@ -3695,9 +3709,18 @@
3695 (re.compile('(zc.buildout|setuptools)-\d+[.]\d+\S*'3709 (re.compile('(zc.buildout|setuptools)-\d+[.]\d+\S*'
3696 '-py\d.\d.egg'),3710 '-py\d.\d.egg'),
3697 '\\1.egg'),3711 '\\1.egg'),
3712 (re.compile('distribute-\d+[.]\d+\S*'
3713 '-py\d.\d.egg'),
3714 'setuptools.egg'),
3698 (re.compile('(zc.buildout|setuptools)( version)? \d+[.]\d+\S*'),3715 (re.compile('(zc.buildout|setuptools)( version)? \d+[.]\d+\S*'),
3699 '\\1 V.V'),3716 '\\1 V.V'),
3700 (re.compile('[-d] setuptools'), '- setuptools'),3717 (re.compile('distribute( version)? \d+[.]\d+\S*'),
3718 'setuptools V.V'),
3719 (re.compile('[-d] (setuptools|distribute)'), '- setuptools'),
3720 (re.compile('distribute'), 'setuptools'),
3721 (re.compile("\nUnused options for buildout: "
3722 "'(distribute|setuptools)\-version'\."),
3723 '')
3701 ])3724 ])
3702 ),3725 ),
37033726
@@ -3713,13 +3736,17 @@
3713 zc.buildout.testing.normalize_egg_py,3736 zc.buildout.testing.normalize_egg_py,
3714 normalize_bang,3737 normalize_bang,
3715 (re.compile('extdemo[.]pyd'), 'extdemo.so'),3738 (re.compile('extdemo[.]pyd'), 'extdemo.so'),
3716 (re.compile('[-d] setuptools-\S+[.]egg'), 'setuptools.egg'),3739 (re.compile('[-d] (setuptools|distribute)-\S+[.]egg'),
3740 'setuptools.egg'),
3717 (re.compile(r'\\[\\]?'), '/'),3741 (re.compile(r'\\[\\]?'), '/'),
3718 (re.compile(r'\#!\S+\bpython\S*'), '#!/usr/bin/python'),3742 (re.compile(r'\#!\S+\bpython\S*'), '#!/usr/bin/python'),
3719 # Normalize generate_script's Windows interpreter to UNIX:3743 # Normalize generate_script's Windows interpreter to UNIX:
3720 (re.compile(r'\nimport subprocess\n'), '\n'),3744 (re.compile(r'\nimport subprocess\n'), '\n'),
3721 (re.compile('subprocess\\.call\\(argv, env=environ\\)'),3745 (re.compile('subprocess\\.call\\(argv, env=environ\\)'),
3722 'os.execve(sys.executable, argv, environ)'),3746 'os.execve(sys.executable, argv, environ)'),
3747 (re.compile('distribute'), 'setuptools'),
3748 # Distribute unzips eggs by default.
3749 (re.compile('\- demoneeded'), 'd demoneeded'),
3723 ]+(sys.version_info < (2, 5) and [3750 ]+(sys.version_info < (2, 5) and [
3724 (re.compile('.*No module named runpy.*', re.S), ''),3751 (re.compile('.*No module named runpy.*', re.S), ''),
3725 (re.compile('.*usage: pdb.py scriptfile .*', re.S), ''),3752 (re.compile('.*usage: pdb.py scriptfile .*', re.S), ''),
@@ -3751,7 +3778,7 @@
3751 zc.buildout.testing.normalize_egg_py,3778 zc.buildout.testing.normalize_egg_py,
3752 (re.compile("buildout: Running \S*setup.py"),3779 (re.compile("buildout: Running \S*setup.py"),
3753 'buildout: Running setup.py'),3780 'buildout: Running setup.py'),
3754 (re.compile('setuptools-\S+-'),3781 (re.compile('(setuptools|distribute)-\S+-'),
3755 'setuptools.egg'),3782 'setuptools.egg'),
3756 (re.compile('zc.buildout-\S+-'),3783 (re.compile('zc.buildout-\S+-'),
3757 'zc.buildout.egg'),3784 'zc.buildout.egg'),
@@ -3759,7 +3786,7 @@
3759 'File "one.py"'),3786 'File "one.py"'),
3760 (re.compile(r'We have a develop egg: (\S+) (\S+)'),3787 (re.compile(r'We have a develop egg: (\S+) (\S+)'),
3761 r'We have a develop egg: \1 V'),3788 r'We have a develop egg: \1 V'),
3762 (re.compile('Picked: setuptools = \S+'),3789 (re.compile('Picked: (setuptools|distribute) = \S+'),
3763 'Picked: setuptools = V'),3790 'Picked: setuptools = V'),
3764 (re.compile(r'\\[\\]?'), '/'),3791 (re.compile(r'\\[\\]?'), '/'),
3765 (re.compile(3792 (re.compile(
@@ -3770,6 +3797,9 @@
3770 # for bug_92891_bootstrap_crashes_with_egg_recipe_in_buildout_section3797 # for bug_92891_bootstrap_crashes_with_egg_recipe_in_buildout_section
3771 (re.compile(r"Unused options for buildout: 'eggs' 'scripts'\."),3798 (re.compile(r"Unused options for buildout: 'eggs' 'scripts'\."),
3772 "Unused options for buildout: 'scripts' 'eggs'."),3799 "Unused options for buildout: 'scripts' 'eggs'."),
3800 (re.compile('distribute'), 'setuptools'),
3801 # Distribute unzips eggs by default.
3802 (re.compile('\- demoneeded'), 'd demoneeded'),
3773 ]),3803 ]),
3774 ),3804 ),
3775 zc.buildout.testselectingpython.test_suite(),3805 zc.buildout.testselectingpython.test_suite(),
37763806
=== modified file 'src/zc/buildout/update.txt'
--- src/zc/buildout/update.txt 2010-03-19 01:39:01 +0000
+++ src/zc/buildout/update.txt 2010-04-29 02:12:21 +0000
@@ -100,8 +100,8 @@
100 ...100 ...
101101
102Now, let's recreate the sample buildout. If we specify constraints on102Now, let's recreate the sample buildout. If we specify constraints on
103the versions of zc.buildout and setuptools to use, running the103the versions of zc.buildout and setuptools (or distribute) to use,
104buildout will install earlier versions of these packages:104running the buildout will install earlier versions of these packages:
105105
106 >>> write(sample_buildout, 'buildout.cfg',106 >>> write(sample_buildout, 'buildout.cfg',
107 ... """107 ... """
@@ -112,6 +112,7 @@
112 ... develop = showversions112 ... develop = showversions
113 ... zc.buildout-version = < 99113 ... zc.buildout-version = < 99
114 ... setuptools-version = < 99114 ... setuptools-version = < 99
115 ... distribute-version = < 99
115 ...116 ...
116 ... [show-versions]117 ... [show-versions]
117 ... recipe = showversions118 ... recipe = showversions
118119
=== modified file 'z3c.recipe.scripts_/src/z3c/recipe/scripts/tests.py'
--- z3c.recipe.scripts_/src/z3c/recipe/scripts/tests.py 2010-02-24 15:52:10 +0000
+++ z3c.recipe.scripts_/src/z3c/recipe/scripts/tests.py 2010-04-29 02:12:21 +0000
@@ -423,8 +423,8 @@
423 zc.buildout.tests.normalize_bang,423 zc.buildout.tests.normalize_bang,
424 (re.compile(r'zc.buildout(-\S+)?[.]egg(-link)?'),424 (re.compile(r'zc.buildout(-\S+)?[.]egg(-link)?'),
425 'zc.buildout.egg'),425 'zc.buildout.egg'),
426 (re.compile('[-d] setuptools-[^-]+-'), 'setuptools-X-'),426 (re.compile('[-d] (setuptools|distribute)-[^-]+-'), 'setuptools-X-'),
427 (re.compile(r'setuptools-[\w.]+-py'), 'setuptools-X-py'),427 (re.compile(r'(setuptools|distribute)-[\w.]+-py'), 'setuptools-X-py'),
428 (re.compile(r'eggs\\\\demo'), 'eggs/demo'),428 (re.compile(r'eggs\\\\demo'), 'eggs/demo'),
429 (re.compile(r'[a-zA-Z]:\\\\foo\\\\bar'), '/foo/bar'),429 (re.compile(r'[a-zA-Z]:\\\\foo\\\\bar'), '/foo/bar'),
430 (re.compile(r'\#!\S+\bpython\S*'), '#!/usr/bin/python'),430 (re.compile(r'\#!\S+\bpython\S*'), '#!/usr/bin/python'),
@@ -432,6 +432,7 @@
432 (re.compile(r'\nimport subprocess\n'), '\n'),432 (re.compile(r'\nimport subprocess\n'), '\n'),
433 (re.compile('subprocess\\.call\\(argv, env=environ\\)'),433 (re.compile('subprocess\\.call\\(argv, env=environ\\)'),
434 'os.execve(sys.executable, argv, environ)'),434 'os.execve(sys.executable, argv, environ)'),
435 (re.compile('distribute'), 'setuptools'),
435 ])436 ])
436 ),437 ),
437 doctest.DocTestSuite(438 doctest.DocTestSuite(
438439
=== modified file 'zc.recipe.egg_/src/zc/recipe/egg/tests.py'
--- zc.recipe.egg_/src/zc/recipe/egg/tests.py 2010-03-19 14:24:54 +0000
+++ zc.recipe.egg_/src/zc/recipe/egg/tests.py 2010-04-29 02:12:21 +0000
@@ -50,9 +50,12 @@
50 zc.buildout.tests.normalize_bang,50 zc.buildout.tests.normalize_bang,
51 (re.compile('zc.buildout(-\S+)?[.]egg(-link)?'),51 (re.compile('zc.buildout(-\S+)?[.]egg(-link)?'),
52 'zc.buildout.egg'),52 'zc.buildout.egg'),
53 (re.compile('[-d] setuptools-[^-]+-'), 'setuptools-X-'),53 (re.compile('[-d] (setuptools|distribute)-[^-]+-'),
54 'setuptools-X-'),
54 (re.compile(r'eggs\\\\demo'), 'eggs/demo'),55 (re.compile(r'eggs\\\\demo'), 'eggs/demo'),
55 (re.compile(r'[a-zA-Z]:\\\\foo\\\\bar'), '/foo/bar'),56 (re.compile(r'[a-zA-Z]:\\\\foo\\\\bar'), '/foo/bar'),
57 # Distribute unzips eggs by default.
58 (re.compile('\- demoneeded'), 'd demoneeded'),
56 ])59 ])
57 ),60 ),
58 doctest.DocFileSuite(61 doctest.DocFileSuite(
@@ -64,7 +67,7 @@
64 (re.compile('__buildout_signature__ = '67 (re.compile('__buildout_signature__ = '
65 'sample-\S+\s+'68 'sample-\S+\s+'
66 'zc.recipe.egg-\S+\s+'69 'zc.recipe.egg-\S+\s+'
67 'setuptools-\S+\s+'70 '(setuptools|distribute)-\S+\s+'
68 'zc.buildout-\S+\s*'71 'zc.buildout-\S+\s*'
69 ),72 ),
70 '__buildout_signature__ = sample- zc.recipe.egg-\n'),73 '__buildout_signature__ = sample- zc.recipe.egg-\n'),
@@ -104,14 +107,17 @@
104 zc.buildout.testing.normalize_path,107 zc.buildout.testing.normalize_path,
105 zc.buildout.testing.normalize_endings,108 zc.buildout.testing.normalize_endings,
106 zc.buildout.testing.normalize_script,109 zc.buildout.testing.normalize_script,
107 (re.compile('Got setuptools \S+'), 'Got setuptools V'),110 (re.compile('Got (setuptools|distribute) \S+'),
108 (re.compile('([d-] )?setuptools-\S+-py'),111 'Got setuptools V'),
112 (re.compile('([d-] )?(setuptools|distribute)-\S+-py'),
109 'setuptools-V-py'),113 'setuptools-V-py'),
110 (re.compile('-py2[.][0-35-9][.]'), 'py2.5.'),114 (re.compile('-py2[.][0-35-9][.]'), 'py2.5.'),
111 (re.compile('zc.buildout-\S+[.]egg'),115 (re.compile('zc.buildout-\S+[.]egg'),
112 'zc.buildout.egg'),116 'zc.buildout.egg'),
113 (re.compile('zc.buildout[.]egg-link'),117 (re.compile('zc.buildout[.]egg-link'),
114 'zc.buildout.egg'),118 'zc.buildout.egg'),
119 # Distribute unzips eggs by default.
120 (re.compile('\- demoneeded'), 'd demoneeded'),
115 ]),121 ]),
116 ),122 ),
117 )123 )

Subscribers

People subscribed via source and target branches

to all changes: