Commit dba11ab1 authored by Gary Poster's avatar Gary Poster

with these changes, I can build zc.buildout and run its tests successfully...

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.
parent 6f4b5b2e
......@@ -99,14 +99,14 @@ if options.setup_source is None:
args = args + ['bootstrap']
to_reload = False
try:
import setuptools # A flag. Sometimes pkg_resources is installed alone.
to_reload = False
import pkg_resources
to_reload = True
if not hasattr(pkg_resources, '_distribute'):
to_reload = True
raise ImportError
import setuptools # A flag. Sometimes pkg_resources is installed alone.
except ImportError:
ez_code = urllib2.urlopen(
options.setup_source).read().replace('\r\n', '\n')
......@@ -118,7 +118,6 @@ except ImportError:
if options.use_distribute:
setup_args['no_fake'] = True
ez['use_setuptools'](**setup_args)
if to_reload:
reload(pkg_resources)
else:
......
......@@ -31,7 +31,10 @@ if os.path.isdir('build'):
shutil.rmtree('build')
try:
to_reload = False
import pkg_resources
to_reload = True
import setuptools # A flag. Sometimes pkg_resources is installed alone.
except ImportError:
ez = {}
exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
......@@ -39,6 +42,8 @@ except ImportError:
ez['use_setuptools'](to_dir='eggs', download_delay=0)
import pkg_resources
if to_reload:
reload(pkg_resources)
env = os.environ.copy() # Windows needs yet-to-be-determined values from this.
env['PYTHONPATH'] = os.path.dirname(pkg_resources.__file__)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment