Commit 81c504f2 authored by Domen Kožar's avatar Domen Kožar

merge

parents 1bccc54d d09f9f55
.installed.cfg
bin/
build/
develop-eggs/
eggs/
parts/
*.pyc
*.egg
*.egg-info
\ No newline at end of file
include *.txt include *.txt
recursive-include src *.txt recursive-include src *.txt
exclude MANIFEST.in buildout.cfg .bzrignore exclude MANIFEST.in buildout.cfg .bzrignore .gitignore
...@@ -976,10 +976,10 @@ class Buildout(UserDict.DictMixin): ...@@ -976,10 +976,10 @@ class Buildout(UserDict.DictMixin):
) )
# Restart # Restart
args = map(zc.buildout.easy_install._safe_arg, sys.argv) args = list(sys.argv)
if not __debug__: if not __debug__:
args.insert(0, '-O') args.insert(0, '-O')
args.insert(0, zc.buildout.easy_install._safe_arg(sys.executable)) args.insert(0, sys.executable)
# We want to make sure that our new site.py is used for rerunning # We want to make sure that our new site.py is used for rerunning
# buildout, so we put the partsdir in PYTHONPATH for our restart. # buildout, so we put the partsdir in PYTHONPATH for our restart.
# This overrides any set PYTHONPATH, but since we generally are # This overrides any set PYTHONPATH, but since we generally are
...@@ -987,6 +987,8 @@ class Buildout(UserDict.DictMixin): ...@@ -987,6 +987,8 @@ class Buildout(UserDict.DictMixin):
# library) then that should be fine. # library) then that should be fine.
env = os.environ.copy() env = os.environ.copy()
env['PYTHONPATH'] = partsdir env['PYTHONPATH'] = partsdir
# windows: Popen will quote args itself if needed
# see subprocess.list2cmdline
sys.exit(subprocess.Popen(args, env=env).wait()) sys.exit(subprocess.Popen(args, env=env).wait())
def _load_extensions(self): def _load_extensions(self):
......
...@@ -151,8 +151,7 @@ def _runsetup(setup, executable, *args): ...@@ -151,8 +151,7 @@ def _runsetup(setup, executable, *args):
setup = os.path.join(setup, 'setup.py') setup = os.path.join(setup, 'setup.py')
d = os.path.dirname(setup) d = os.path.dirname(setup)
args = [zc.buildout.easy_install._safe_arg(arg) args = list(args)
for arg in args]
args.insert(0, '-q') args.insert(0, '-q')
env = dict(os.environ) env = dict(os.environ)
if executable == sys.executable: if executable == sys.executable:
...@@ -163,9 +162,9 @@ def _runsetup(setup, executable, *args): ...@@ -163,9 +162,9 @@ def _runsetup(setup, executable, *args):
try: try:
os.chdir(d) os.chdir(d)
p = subprocess.Popen( p = subprocess.Popen(
[zc.buildout.easy_install._safe_arg(executable), setup] + args, [executable, setup] + args,
stdout=subprocess.PIPE, stderr=subprocess.STDOUT, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
close_fds=True, env=env) close_fds=MUST_CLOSE_FDS, env=env)
out = p.stdout.read() out = p.stdout.read()
if p.wait(): if p.wait():
print out print out
......
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