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

[minion-cvs] Include bsddb module with standalone win32 distribution.



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

Modified Files:
	setup.py 
Log Message:
Include bsddb module with standalone win32 distribution.

Index: setup.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/setup.py,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -d -r1.84 -r1.85
--- setup.py	8 Dec 2003 06:45:28 -0000	1.84
+++ setup.py	8 Dec 2003 16:18:11 -0000	1.85
@@ -15,6 +15,10 @@
 #
 # (Because of syntax issues, this file won't even parse for any python older
 #  than 1.3.  I'm okay with that.)
+if getattr(sys, 'platform', None) == 'win32':
+    if not hasattr(sys, 'version_info') or sys.version_info < (2,3,0):
+        print "Sorry, but I require Python 2.3 or higher on Windows."
+        sys.exit(1)
 if not hasattr(sys, 'version_info') or sys.version_info < (2, 0, 0):
     print "Sorry, but I require Python 2.0 or higher."
     sys.exit(1)
@@ -354,6 +358,10 @@
     import mixminion.ClientMain
     import mixminion.server.ServerMain
     import mixminion.directory.DirMain
+    # The 'anydbm' module uses __import__ to conditionally load bsddb.
+    # We need to be sure that it gets included, or else we'll get stuck
+    # using the dumbdbm module.
+    import bsddb, dbhash
 """)
 if sys.platform == 'win32':
     f.write("# On win32, we default to shell mode.\n")