Commit f5b593cd authored by Laurence Rowe's avatar Laurence Rowe

Run easy_install with specified setuptools_version

If setuptools is installed globally by easy_install then the easy_install.pth gets added to sys.path before PYTHONPATH and the wrong setuptools version is used.
parent 1fb55060
......@@ -318,7 +318,9 @@ class Installer:
try:
path = setuptools_loc
args = [sys.executable, '-c', _easy_install_cmd, '-mZUNxd', tmp]
args = [sys.executable, '-c',
('import sys; sys.path[0:0] = [%r]; ' % path) +
_easy_install_cmd, '-mZUNxd', tmp]
level = logger.getEffectiveLevel()
if level > 0:
args.append('-q')
......@@ -333,9 +335,7 @@ class Installer:
sys.stdout.flush() # We want any pending output first
exit_code = subprocess.call(
list(args),
env=dict(os.environ, PYTHONPATH=path))
exit_code = subprocess.call(list(args))
dists = []
env = pkg_resources.Environment([tmp])
......
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