Commit 4d14d8f0 authored by Jim Fulton's avatar Jim Fulton

stop usinf os.spawn (and _safe_arg where not needed)

parent 340dcabf
......@@ -111,19 +111,14 @@ def get(url):
def _runsetup(setup, executable, *args):
if os.path.isdir(setup):
setup = os.path.join(setup, 'setup.py')
d = os.path.dirname(setup)
args = [zc.buildout.easy_install._safe_arg(arg)
for arg in args]
args = list(args)
args.insert(0, '-q')
args.append(dict(os.environ, PYTHONPATH=setuptools_location))
here = os.getcwd()
try:
os.chdir(d)
os.spawnle(os.P_WAIT, executable,
zc.buildout.easy_install._safe_arg(executable),
setup, *args)
os.chdir(os.path.dirname(setup))
zc.buildout.easy_install.call_subprocess(
[executable, setup] + args,
env=dict(os.environ, PYTHONPATH=setuptools_location))
if os.path.exists('build'):
rmtree('build')
finally:
......
......@@ -2813,17 +2813,16 @@ def getWorkingSetWithBuildoutEgg(test):
# We have a develop egg, create a real egg for it:
here = os.getcwd()
os.chdir(os.path.dirname(dist.location))
assert os.spawnle(
os.P_WAIT, sys.executable,
zc.buildout.easy_install._safe_arg(sys.executable),
os.path.join(os.path.dirname(dist.location), 'setup.py'),
'-q', 'bdist_egg', '-d', eggs,
dict(os.environ,
PYTHONPATH=pkg_resources.working_set.find(
pkg_resources.Requirement.parse('setuptools')
).location,
),
) == 0
zc.buildout.easy_install.call_subprocess(
[sys.executable,
os.path.join(os.path.dirname(dist.location), 'setup.py'),
'-q', 'bdist_egg', '-d', eggs],
env=dict(os.environ,
PYTHONPATH=pkg_resources.working_set.find(
pkg_resources.Requirement.parse('setuptools')
).location,
),
)
os.chdir(here)
os.remove(os.path.join(eggs, 'zc.buildout.egg-link'))
......
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