Index: dist/src/Lib/distutils/core.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/core.py,v retrieving revision 1.63 diff -u -r1.63 core.py --- dist/src/Lib/distutils/core.py 14 Oct 2004 10:02:07 -0000 1.63 +++ dist/src/Lib/distutils/core.py 21 Oct 2004 03:37:44 -0000 @@ -201,6 +201,18 @@ Returns the Distribution instance, which provides all information used to drive the Distutils. """ + global _setup_stop_after, _setup_distribution + setup_stop_after = _setup_stop_after + setup_distribtion = _setup_distribution + try: + rval = _run_setup(script_name, script_args, stop_after) + return rval + finally: + _setup_stop_after = setup_stop_after + _setup_distribtion = setup_distribution + + +def _run_setup(script_name, script_args, stop_after): if stop_after not in ('init', 'config', 'commandline', 'run'): raise ValueError, "invalid value for 'stop_after': %r" % (stop_after,)