Commit 64aeb370 authored by Jim Fulton's avatar Jim Fulton

Fixed a bug in runsetup that caused setup scripts that introspected

__file__ to fail.
parent 14ba71cc
...@@ -638,6 +638,7 @@ class Buildout(dict): ...@@ -638,6 +638,7 @@ class Buildout(dict):
setuptools=setuptools, setuptools=setuptools,
setupdir=os.path.dirname(setup), setupdir=os.path.dirname(setup),
setup=setup, setup=setup,
__file__ = setup,
)) ))
os.spawnl(os.P_WAIT, sys.executable, sys.executable, tsetup, os.spawnl(os.P_WAIT, sys.executable, sys.executable, tsetup,
*[zc.buildout.easy_install._safe_arg(a) *[zc.buildout.easy_install._safe_arg(a)
...@@ -651,6 +652,8 @@ import sys ...@@ -651,6 +652,8 @@ import sys
sys.path.insert(0, %(setuptools)r) sys.path.insert(0, %(setuptools)r)
import os, setuptools import os, setuptools
__file__ = %(__file__)r
os.chdir(%(setupdir)r) os.chdir(%(setupdir)r)
sys.argv[0] = %(setup)r sys.argv[0] = %(setup)r
execfile(%(setup)r) execfile(%(setup)r)
......
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