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

Proposed by Gary Poster
Status: Needs review
Proposed branch: lp:~gary/zc.buildout/python-support-7
Merge into: lp:zc.buildout
Prerequisite: lp:~gary/zc.buildout/python-support-6-egg-control
Diff against target: 53 lines (+8/-4)
2 files modified
bootstrap/bootstrap.py (+3/-4)
dev.py (+5/-0)
To merge this branch: bzr merge lp:~gary/zc.buildout/python-support-7
Reviewer Review Type Date Requested Status
Francis J. Lacoste (community) Approve
Review via email: mp+20092@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Gary Poster (gary) wrote :

This branch makes some small changes that lets it be possible to use my system Python to develop zc.buildout. Tests pass with it. To be really robust, zc.recipe.testrunner should use zc.buildout.easy_install.sitepackage_safe_scripts, and the interpreter generated in buildout.cfg should use z3c.recipe.scripts, so this is more of a proof of concept than a full implementation. The full changes would need to wait till this version of buildout was released, though.

Revision history for this message
Francis J. Lacoste (flacoste) :
review: Approve
560. By Gary Poster

merge from gary-6 <- gary-5

Unmerged revisions

560. By Gary Poster

merge from gary-6 <- gary-5

559. By Gary Poster

with these changes, I can build zc.buildout and run its tests successfully with my system Python. To make it fully robust, zc.recipe.test probably would need to use sitepackage_safe_scripts, but this works for now.

558. By Gary Poster

add test for recent fix for buildout

557. By Gary Poster

make the buildout script itself safe for a Python with site packages.

556. By Gary Poster

merge from gary-5 <- gary-4

555. By Gary Poster

merge from gary-5 <- gary-4

554. By Gary Poster

make tests pass in Windows.

553. By Gary Poster

update docs for changes in this branch.

552. By Gary Poster

merge gary-5 changes

551. By Gary Poster

integrate ability to control what eggs are accepted from site-packages into z3c.recipe.scripts. Without this, the ability to use z3c.recipe.scripts without site-packages was broken.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bootstrap/bootstrap.py'
2--- bootstrap/bootstrap.py 2010-02-24 23:24:16 +0000
3+++ bootstrap/bootstrap.py 2010-02-24 23:24:16 +0000
4@@ -99,14 +99,14 @@
5
6 args = args + ['bootstrap']
7
8-to_reload = False
9
10 try:
11- import setuptools # A flag. Sometimes pkg_resources is installed alone.
12+ to_reload = False
13 import pkg_resources
14+ to_reload = True
15 if not hasattr(pkg_resources, '_distribute'):
16- to_reload = True
17 raise ImportError
18+ import setuptools # A flag. Sometimes pkg_resources is installed alone.
19 except ImportError:
20 ez_code = urllib2.urlopen(
21 options.setup_source).read().replace('\r\n', '\n')
22@@ -118,7 +118,6 @@
23 if options.use_distribute:
24 setup_args['no_fake'] = True
25 ez['use_setuptools'](**setup_args)
26-
27 if to_reload:
28 reload(pkg_resources)
29 else:
30
31=== modified file 'dev.py'
32--- dev.py 2010-02-24 23:24:16 +0000
33+++ dev.py 2010-02-24 23:24:16 +0000
34@@ -31,7 +31,10 @@
35 shutil.rmtree('build')
36
37 try:
38+ to_reload = False
39 import pkg_resources
40+ to_reload = True
41+ import setuptools # A flag. Sometimes pkg_resources is installed alone.
42 except ImportError:
43 ez = {}
44 exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
45@@ -39,6 +42,8 @@
46 ez['use_setuptools'](to_dir='eggs', download_delay=0)
47
48 import pkg_resources
49+ if to_reload:
50+ reload(pkg_resources)
51
52 env = os.environ.copy() # Windows needs yet-to-be-determined values from this.
53 env['PYTHONPATH'] = os.path.dirname(pkg_resources.__file__)

Subscribers

People subscribed via source and target branches

to all changes: