summaryrefslogtreecommitdiff
path: root/numpy/distutils/core.py
diff options
context:
space:
mode:
authorPearu Peterson <pearu.peterson@gmail.com>2007-06-01 10:15:17 +0000
committerPearu Peterson <pearu.peterson@gmail.com>2007-06-01 10:15:17 +0000
commit84e68dd73f68f6bfd48ffa7007f65434bd9cb538 (patch)
tree29c87459a49b1d1edf1be49595a2d3db757b222b /numpy/distutils/core.py
parent9949bc651f2213f2ac3567365a57a61f67a77772 (diff)
downloadnumpy-84e68dd73f68f6bfd48ffa7007f65434bd9cb538.tar.gz
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).
Diffstat (limited to 'numpy/distutils/core.py')
-rw-r--r--numpy/distutils/core.py17
1 files changed, 17 insertions, 0 deletions
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()