From 84e68dd73f68f6bfd48ffa7007f65434bd9cb538 Mon Sep 17 00:00:00 2001 From: Pearu Peterson Date: Fri, 1 Jun 2007 10:15:17 +0000 Subject: Undo changeset 3839: interactive support is being used (this convinient on windows where one can click on setup.py and build the numpy or whatever package in 2 keystrokes). --- numpy/distutils/core.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'numpy/distutils/core.py') diff --git a/numpy/distutils/core.py b/numpy/distutils/core.py index a0012e20e..5ae6353f2 100644 --- a/numpy/distutils/core.py +++ b/numpy/distutils/core.py @@ -98,7 +98,24 @@ def get_distribution(always=False): dist = distutils.dist.Distribution() return dist +def _exit_interactive_session(_cache=[]): + if _cache: + return # been here + _cache.append(1) + print '-'*72 + raw_input('Press ENTER to close the interactive session..') + print '='*72 + def setup(**attr): + + if len(sys.argv)<=1 and not attr.get('script_args',[]): + from interactive import interactive_sys_argv + import atexit + atexit.register(_exit_interactive_session) + sys.argv[:] = interactive_sys_argv(sys.argv) + if len(sys.argv)>1: + return setup(**attr) + cmdclass = numpy_cmdclass.copy() new_attr = attr.copy() -- cgit v1.2.1