my previous change did what I said it should not: it changed the current

directory to the directory in which the setup.py script lived (which made
__file__ wrong)

fixed, with test that the script is run in the current directory of the caller
This commit is contained in:
Fred Drake 2008-04-04 11:31:14 +00:00
parent dc96a77c3a
commit fe7056240b
2 changed files with 49 additions and 8 deletions

View file

@ -212,7 +212,6 @@ def run_setup (script_name, script_args=None, stop_after="run"):
save_argv = sys.argv
g = {'__file__': script_name}
l = {}
os.chdir(os.path.dirname(script_name) or os.curdir)
try:
try:
sys.argv[0] = script_name