[Zope-CVS] CVS: ZODB3 - setup.py:1.16

Jeremy Hylton jeremy@zope.com
Mon, 12 Aug 2002 18:44:31 -0400


Update of /cvs-repository/ZODB3
In directory cvs.zope.org:/tmp/cvs-serv31453

Modified Files:
	setup.py 
Log Message:
Add --with-zeo1 option to build and install ZEO1 instead of ZEO2.


=== ZODB3/setup.py 1.15 => 1.16 ===
--- ZODB3/setup.py:1.15	Tue Jun 11 15:14:45 2002
+++ ZODB3/setup.py	Mon Aug 12 18:44:31 2002
@@ -1,5 +1,6 @@
 from distutils.core import setup
 from distutils.extension import Extension
+import sys
 
 ExtensionClass = Extension(name = 'ExtensionClass',
                            sources = ['ExtensionClass/src/ExtensionClass.c'])
@@ -83,7 +84,6 @@
                 )
 
 packages = ['BTrees', 'BTrees.tests',
-            'ZEO', 'ZEO.zrpc', 'ZEO.tests',
             'ZODB', 'ZODB.tests',
             "Persistence",
             "ThreadedAsync",
@@ -91,6 +91,8 @@
             "zdaemon", "zdaemon.tests",
             ]
 
+package_dir = {}
+
 # XXX This doesn't work for source distributions; we need a better way
 # to spell things like this in distutils.  Like this, the
 # bsddb3Storage package isn't included in the source distribution.
@@ -105,16 +107,44 @@
     pass
 else:
     packages.extend(["bsddb3Storage", "bsddb3Storage.tests"])
+    package_dir['bsddb3Storage'] = 'bsddb3Storage/bsddb3Storage'
+
+# This version of ZODB ships with two incompatible versions of ZEO.
+# The recommended version is ZEO 2.0, which is the focus of current
+# ZEO development.  It is, however, incompatible with ZEO 1.0, which
+# shipped with earlier versions of ZODB.  To upgrade, all ZEO clients
+# and servers must be upgraded at the same time.
+#
+# Since it may be inconvenient to upgrade at the same time this
+# software is installed, you can pass --with-zeo1 to setup.py on the
+# command-line.  This will build, test, and install ZEO 1.0 instead of
+# ZEO 2.0.
+#
+# We've made no effort to make the -b option to test.py work.  If you
+# pass --with-zeo1 to setup.py and then run test.py -b, it will
+# clobber ZEO 1.0 and install ZEO 2.0.
+
+# peek at the command-line arguments
+ZEO_VERSION = 2
+if "--with-zeo1" in sys.argv:
+    ZEO_VERSION = 1
+    sys.argv.remove("--with-zeo1")
+    
+if ZEO_VERSION == 1:
+    packages += ["ZEO", "ZEO.tests"]
+    package_dir["ZEO"] = "ZEO1"
+else:
+    packages += ["ZEO", "ZEO.zrpc", "ZEO.tests"]
 
-setup(name="StandaloneZODB",
-      version="1.0",
+setup(name="ZODB3",
+      version="3.1b1",
       description="Zope Object Database: object database and persistence",
       maintainer="Zope Corp.",
       maintainer_email="zodb-dev@zope.org",
       url = "http://www.zope.org/Wikis/ZODB/FrontPage",
 
-      package_dir = {'bsddb3Storage': 'bsddb3Storage/bsddb3Storage'},
       packages = packages,
+      package_dir = package_dir,
       ext_modules = [ExtensionClass, Acquisition, ComputedAttribute,
                      MethodObject, Missing, MultiMapping, Sync,
                      ThreadLock, Record, cPersistence, cPickleCache,