Commit 975ecd57 authored by Gary Poster's avatar Gary Poster

another small tweak for mimicing site.py.

parent 5ba1e6ed
...@@ -1650,6 +1650,8 @@ def _generate_site(dest, working_set, executable, extra_paths=(), ...@@ -1650,6 +1650,8 @@ def _generate_site(dest, working_set, executable, extra_paths=(),
original_path_setup = ( original_path_setup = (
addsitedir_namespace_originalpackages_snippet + addsitedir_namespace_originalpackages_snippet +
original_path_setup) original_path_setup)
else:
preamble = '\n setuptools_path = None'
egg_path_string, relative_preamble = _relative_path_and_setup( egg_path_string, relative_preamble = _relative_path_and_setup(
site_path, path, relative_paths, indent_level=2, omit_os_import=True) site_path, path, relative_paths, indent_level=2, omit_os_import=True)
if relative_preamble: if relative_preamble:
...@@ -1699,7 +1701,7 @@ original_path_snippet = ''' ...@@ -1699,7 +1701,7 @@ original_path_snippet = '''
%s %s
] ]
for path in original_paths: for path in original_paths:
if path not in known_paths: if path == setuptools_path or path not in known_paths:
addsitedir(path, known_paths)''' addsitedir(path, known_paths)'''
addsitepackages_script = '''\ addsitepackages_script = '''\
......
...@@ -1277,6 +1277,7 @@ this is very straightforward. ...@@ -1277,6 +1277,7 @@ this is very straightforward.
"""Add site packages, as determined by zc.buildout. """Add site packages, as determined by zc.buildout.
<BLANKLINE> <BLANKLINE>
See original_addsitepackages, below, for the original version.""" See original_addsitepackages, below, for the original version."""
setuptools_path = None
buildout_paths = [ buildout_paths = [
'/interpreter/eggs/demo-0.3-pyN.N.egg', '/interpreter/eggs/demo-0.3-pyN.N.egg',
'/interpreter/eggs/demoneeded-1.1-pyN.N.egg' '/interpreter/eggs/demoneeded-1.1-pyN.N.egg'
...@@ -1291,7 +1292,7 @@ this is very straightforward. ...@@ -1291,7 +1292,7 @@ this is very straightforward.
... ...
] ]
for path in original_paths: for path in original_paths:
if path not in known_paths: if path == setuptools_path or path not in known_paths:
addsitedir(path, known_paths) addsitedir(path, known_paths)
return known_paths return known_paths
<BLANKLINE> <BLANKLINE>
...@@ -1369,7 +1370,7 @@ call to another text fixture to create. ...@@ -1369,7 +1370,7 @@ call to another text fixture to create.
... ...
] ]
for path in original_paths: for path in original_paths:
if path not in known_paths: if path == setuptools_path or path not in known_paths:
addsitedir(path, known_paths) addsitedir(path, known_paths)
return known_paths return known_paths
<BLANKLINE> <BLANKLINE>
...@@ -1434,7 +1435,7 @@ at that result. ...@@ -1434,7 +1435,7 @@ at that result.
... ...
] ]
for path in original_paths: for path in original_paths:
if path not in known_paths: if path == setuptools_path or path not in known_paths:
addsitedir(path, known_paths) addsitedir(path, known_paths)
return known_paths return known_paths
<BLANKLINE> <BLANKLINE>
......
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