diff options
author | Robert Collins <rbtcollins@hp.com> | 2015-07-28 15:55:07 +1200 |
---|---|---|
committer | Robert Collins <rbtcollins@hp.com> | 2015-07-28 15:55:07 +1200 |
commit | c6d9228290c1635588d8edddc04f2b2278705867 (patch) | |
tree | f17f4ee2072cfe550286b26501fc5e33fe75eb89 /Lib/distutils/core.py | |
parent | 9c11d91b5089bba386751a9d0ba88377f5b4321f (diff) | |
download | cpython-git-c6d9228290c1635588d8edddc04f2b2278705867.tar.gz |
Issue #23426: run_setup was broken in distutils.
Patch from Alexander Belopolsky.
Diffstat (limited to 'Lib/distutils/core.py')
-rw-r--r-- | Lib/distutils/core.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/distutils/core.py b/Lib/distutils/core.py index f05b34b295..d603d4a45a 100644 --- a/Lib/distutils/core.py +++ b/Lib/distutils/core.py @@ -204,16 +204,15 @@ def run_setup (script_name, script_args=None, stop_after="run"): global _setup_stop_after, _setup_distribution _setup_stop_after = stop_after - save_argv = sys.argv + save_argv = sys.argv.copy() g = {'__file__': script_name} - l = {} try: try: sys.argv[0] = script_name if script_args is not None: sys.argv[1:] = script_args with open(script_name, 'rb') as f: - exec(f.read(), g, l) + exec(f.read(), g) finally: sys.argv = save_argv _setup_stop_after = None |