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

[minion-cvs] Set of hacks (some ugly) to make py2exe 0.5.0 happy. Mo...



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

Modified Files:
	TODO setup.py 
Log Message:
Set of hacks (some ugly) to make py2exe 0.5.0 happy. More work needed to de-uglify hacks

Index: TODO
===================================================================
RCS file: /home/minion/cvsroot/src/minion/TODO,v
retrieving revision 1.199
retrieving revision 1.200
diff -u -d -r1.199 -r1.200
--- TODO	6 Mar 2004 00:33:09 -0000	1.199
+++ TODO	6 Mar 2004 06:39:44 -0000	1.200
@@ -73,9 +73,9 @@
                 o Better response to failed bind(2)
                 o Don't make errors kill 'mixminion shell'.
                 o Handle \r\n when decoding stuff.
-        - Windows stuff
+        . Windows stuff
                 - Must include openssl libs with python-needed installer
-                - Use new version of py2exe
+                o Use new version of py2exe
 
 Deferred from 0.0.7:
         - Specification

Index: setup.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/setup.py,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -d -r1.90 -r1.91
--- setup.py	6 Mar 2004 00:04:37 -0000	1.90
+++ setup.py	6 Mar 2004 06:39:44 -0000	1.91
@@ -351,10 +351,10 @@
 except:
     print 'ERROR importing mixminion package.'
     raise
-    """)
+""")
     if 'py2exe' in sys.argv:
         f.write("""\
-if 1 == 0:
+if 1==0:
     # These import statements need to be here so that py2exe knows to
     # include all of the mixminion libraries.  Main.py imports libraries
     # conditionally with __import__ --- but that confuses py2exe.
@@ -368,7 +368,7 @@
     # We need to be sure that it gets included, or else we'll get stuck
     # using the dumbdbm module.
     import bsddb, dbhash
-    """)
+""")
     if name == 'mixminiond':
         f.write("\nmixminion.Main.main(sys.argv, 1)\n")
     else:
@@ -507,6 +507,13 @@
     libraries=LIBRARIES,
     define_macros=MACROS)
 
+
+if 'py2exe' in sys.argv:
+    # Py2EXE wants numberic versions for Windows
+    VERSION = "." .join(map(str,VERSION_INFO))
+    # XXXX WRONG!!!! 
+    sys.path.append("./build/lib.win32-2.3")
+
 setup(name='Mixminion',
       version=VERSION,
       license="LGPL",
@@ -519,7 +526,20 @@
       packages=['mixminion', 'mixminion.server', 'mixminion.directory'],
       scripts=SCRIPTS,
       ext_modules=[extmodule],
-      cmdclass={'run': runMMCommand})
+      cmdclass={'run': runMMCommand},
+
+
+      # for Py2EXE
+      console=SCRIPTS,
+      data_files=[("",["README","TODO","LICENSE","HISTORY",
+                      "etc/mixminiond.conf"])],
+      zipfile=r'lib\shared.zip',
+      options={'py2exe':
+                { 'compressed':1,
+                  'excludes': ['mixminion._textwrap','mixminion._unittest',
+                               'mixminion._zlibutil','coverage'] }
+              },
+)
 
 try:
     for s in SCRIPTS: