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

[minion-cvs] Add a shell-like interactive mode for windows



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

Modified Files:
	setup.py 
Log Message:
Add a shell-like interactive mode for windows

Index: setup.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/setup.py,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -d -r1.68 -r1.69
--- setup.py	10 Jul 2003 20:01:30 -0000	1.68
+++ setup.py	10 Jul 2003 23:12:02 -0000	1.69
@@ -124,6 +124,8 @@
       )
 ======================================================================"""
 
+#XXXX005 Use pkg-config when possible, if it exists.
+
 if USE_OPENSSL and sys.platform == 'win32':
     INCLUDE_DIRS = []
     STATIC_LIBS = []
@@ -304,6 +306,22 @@
 mixminion.Main.main(sys.argv)
 """)
 f.close()
+
+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
+
+    mixminion.Main.main(sys.argv+['shell'])
+    """)
+    f.close()
 
 #======================================================================
 # Define a helper to let us run commands from the compiled code.