[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[minion-cvs] Make shell wrapper work



Update of /home/minion/cvsroot/src/minion
In directory moria.mit.edu:/tmp/cvs-serv24267

Modified Files:
	setup.py 
Log Message:
Make shell wrapper work

Index: setup.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/setup.py,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -d -r1.69 -r1.70
--- setup.py	10 Jul 2003 23:12:02 -0000	1.69
+++ setup.py	10 Jul 2003 23:27:50 -0000	1.70
@@ -307,22 +307,26 @@
 """)
 f.close()
 
+SCRIPTS = [ SCRIPT_PATH ]
+
 if sys.platform == 'win32':
     f = open(SCRIPT_PATH+"i.py", 'wt')
     f.write("import sys\n")
     if pathextra:
         f.write("sys.path[0:0] = [%r]\n"%pathextra)
     f.write("""\
-    try:
-        import mixminion.Main
-    except:
-        print 'ERROR importing mixminion package.'
-        raise
+try:
+    import mixminion.Main
+except:
+    print 'ERROR importing mixminion package.'
+    raise
 
-    mixminion.Main.main(sys.argv+['shell'])
-    """)
+mixminion.Main.main(sys.argv+['shell'])
+""")
     f.close()
 
+    SCRIPTS.append(SCRIPT_PATH+"i.py")
+
 #======================================================================
 # Define a helper to let us run commands from the compiled code.
 def _haveCmd(cmdname):
@@ -457,11 +461,12 @@
       url="http://www.mixminion.net/";,
       package_dir={ '' : 'lib' },
       packages=['mixminion', 'mixminion.server', 'mixminion.directory'],
-      scripts=[SCRIPT_PATH],
+      scripts=SCRIPTS,
       ext_modules=[extmodule],
       cmdclass={'run': runMMCommand})
 
 try:
-    os.unlink(SCRIPT_PATH)
+    for s in SCRIPTS:
+        os.unlink(s)
 except:
     pass