[Zope-Checkins] CVS: Zope - setup.py:1.7

Matt Behrens matt@zigg.com
Tue, 9 Jul 2002 11:15:20 -0400


Update of /cvs-repository/Zope
In directory cvs.zope.org:/tmp/cvs-serv18358

Modified Files:
	setup.py 
Log Message:
Add support for ZOPE_HOME and a setup.py that is capable of installing
all Zope software, based on the work in the installer branch.

All tests still pass when built with python2.1 setup.py build_ext -i :-)



=== Zope/setup.py 1.6 => 1.7 === (1276/1376 lines abridged)
 ##############################################################################
 #
-# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
+# Copyright (c) 2002 Zope Corporation and Contributors. All Rights Reserved.
 #
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
@@ -11,330 +11,1071 @@
 # FOR A PARTICULAR PURPOSE
 #
 ##############################################################################
-'''Distutils setup file for Zope
 
-Common usage: python setup.py build_ext -i
-'''
+"""
+Distutils setup for Zope
 
-import os
-import sys
+  In-place building
 
-from distutils.core import setup
-from distutils.extension import Extension
+    This builds extension modules in-place, much like build_extensions.py
+    does.  Use 'setup.py' like this::
 
+      python setup.py build_ext -i
 
-SETUP_BERKELEY = 0
-SETUP_ZEO = 0
-SETUP_OLD_BTREE = 1
-SETUP_CACCESSCONTROL = 1
-SETUP_DCPYEXPAT = 1
-SETUP_SPLITTERS = 1
-SETUP_ZCTEXTINDEX = 1
-
-
-# a few constants
-zope_corp = "Zope Corporation"
-zodb_email = "zodb-dev@zope.org"
-zodb_wiki = "http://www.zope.org/Wikis/ZODB/FrontPage"
-
-orig_dir = os.getcwd()
-
-if __name__ == '__main__':
-    top_dir = os.path.abspath(os.getcwd())
-else:
-    top_dir = os.path.abspath(os.path.dirname(__file__))
-

[-=- -=- -=- 1276 lines omitted -=- -=- -=-]

-    prefix1 = 'Products/PluginIndexes/TextIndex/Splitter/'
-    prefix2 = prefix1.replace('/', '.')
-    ext_modules = [
-        Extension(prefix2 + "ZopeSplitter.ZopeSplitter",
-                  [prefix1 + 'ZopeSplitter/src/ZopeSplitter.c']),
-        Extension(prefix2 + "ISO_8859_1_Splitter.ISO_8859_1_Splitter",
-                  [prefix1 + 'ISO_8859_1_Splitter/src/ISO_8859_1_Splitter.c']),
-        Extension(prefix2 + "UnicodeSplitter.UnicodeSplitter",
-                  [prefix1 + 'UnicodeSplitter/src/UnicodeSplitter.c']),
-        ]
-
-    setup(name="Splitter",
-          version="1.0",
-          description="Splitters for Zope 2.5",
-          author="Andreas Jung",
-          author_email="andreas@zope.com",
-          url="http://www.zope.org/...",
-          ext_modules=ext_modules,
-          packages=['Products.PluginIndexes.TextIndex.Splitter']
-          )
-
-
-if SETUP_ZCTEXTINDEX and os.path.isdir(zct_src):
-    stopper = Extension(name = "Products.ZCTextIndex.stopper",
-                        sources = ["Products/ZCTextIndex/stopper.c"])
-    okascore = Extension(name = "Products.ZCTextIndex.okascore",
-                         sources = ["Products/ZCTextIndex/okascore.c"])
-
-    setup(name = "Products.ZCTextIndex",
-          ext_modules = [stopper, okascore])
-
-
-# Lib -- misc. support files
-# This might be expanded with other Zope packages.
-setup(name = "Other libraries",
-      packages = ["Persistence",
-                  "ThreadedAsync",
-                  "zLOG", "zLOG.tests",
-                  "zdaemon",
-                  ]
-      )
+    cmdclass={'install_data': install_data}
+)
+distutils_setup(
+    name='Zope',
+    author=AUTHOR,
 
-os.chdir(top_dir)
+    py_modules=setup_info.get('py_modules', [])
+)