[Zope-Checkins] SVN: Zope/branches/philikon-zope32-integration/ Stab at building through zpkgutils. I don't really know what I'm doing,

Philipp von Weitershausen philikon at philikon.de
Sun Oct 30 12:56:52 EST 2005


Log message for revision 39747:
  Stab at building through zpkgutils. I don't really know what I'm doing,
  though, so it doesn't work yet.
  

Changed:
  A   Zope/branches/philikon-zope32-integration/releases/
  A   Zope/branches/philikon-zope32-integration/releases/Zope2/
  U   Zope/branches/philikon-zope32-integration/releases/Zope2/DEPENDENCIES.cfg
  U   Zope/branches/philikon-zope32-integration/releases/Zope2/PACKAGE.cfg
  U   Zope/branches/philikon-zope32-integration/releases/Zope2/SETUP.cfg
  A   Zope/branches/philikon-zope32-integration/releases/Zope2.cfg
  A   Zope/branches/philikon-zope32-integration/releases/Zope2.map
  U   Zope/branches/philikon-zope32-integration/setup.py

-=-
Copied: Zope/branches/philikon-zope32-integration/releases/Zope2 (from rev 39741, Zope3/trunk/releases/Zope)

Modified: Zope/branches/philikon-zope32-integration/releases/Zope2/DEPENDENCIES.cfg
===================================================================
--- Zope3/trunk/releases/Zope/DEPENDENCIES.cfg	2005-10-30 17:10:32 UTC (rev 39741)
+++ Zope/branches/philikon-zope32-integration/releases/Zope2/DEPENDENCIES.cfg	2005-10-30 17:56:52 UTC (rev 39747)
@@ -4,29 +4,59 @@
 # We'll start with a micro distribution, and add the commented out
 # things once we're confident the core is working.
 
-zope.contentprovider
-zope.viewlet
+AccessControl
+Acquisition
+App
+ComputedAttribute
+DateTime
+DocumentTemplate
+ExtensionClass
+Globals
+HelpSys
+ImageFile
+Interface
+Lifetime
+MethodObject
+Missing
+MultiMapping
+OFS
+Persistence
+Products
+Record
+RestrictedPython
+Shared
+Signals
+StructuredText
+TAL
+Testing
+ThreadLock
+TreeDisplay
+ZClasses
+ZPublisher
+ZServer
+ZTUtils         
+Zope
+Zope2
+ZopeUndo
+docutils
+initgroups
+nt_svcutils
+reStructuredText
+tempstorage
+webdav
+zExceptions
+zLOG
+
 zope.app
-zope.app.apidoc
-zope.app.authentication
-zope.app.dav
-zope.app.debugskin
-zope.app.dtmlpage
-zope.app.file
-zope.app.ftp
-zope.app.generations
-zope.app.i18nfile
-zope.app.introspector
-zope.app.mail
-zope.app.onlinehelp
-zope.app.pluggableauth
-zope.app.rdb
-zope.app.securitypolicy
-zope.app.server
-zope.app.session
-zope.app.sqlscript
-zope.app.tree
-zope.app.undo
-zope.app.zptpage
-zope.app.catalog
-zope.app.zptpage.textindex
+
+# zope.app depends for us on:
+# - ZODB
+# - persistent
+# - transaction
+# - zdaemon
+# - zodbcode
+# - ZConfig (indirectly)
+# - ThreadedAsync (indirectly)
+# - ZConfig (indirectly)
+# - zdaemon (indirectly)
+# - pytz (indirectly)

Modified: Zope/branches/philikon-zope32-integration/releases/Zope2/PACKAGE.cfg
===================================================================
--- Zope3/trunk/releases/Zope/PACKAGE.cfg	2005-10-30 17:10:32 UTC (rev 39741)
+++ Zope/branches/philikon-zope32-integration/releases/Zope2/PACKAGE.cfg	2005-10-30 17:56:52 UTC (rev 39747)
@@ -1,10 +1,8 @@
 <load>
-  LICENSES.txt          svn://svn.zope.org/repos/main/Zope3/tags/*/LICENSES.txt
-  ZopePublicLicense.txt svn://svn.zope.org/repos/main/Zope3/tags/*/ZopePublicLicense.txt
-  bin/mkzopeinstance    svn://svn.zope.org/repos/main/Zope3/tags/*/bin/mkzopeinstance
-  bin/mkzeoinstance     svn://svn.zope.org/repos/main/Zope3/tags/*/bin/mkzeoinstance
-  doc                   svn://svn.zope.org/repos/main/Zope3/tags/*/doc/
-  zopeskel              svn://svn.zope.org/repos/main/Zope3/tags/*/zopeskel/
+  bin/mkzopeinstance.py svn://svn.zope.org/repos/main/Zope/tags/*/utilities/mkzopeinstance.py
+  bin/mkzeoinstance.py  svn://svn.zope.org/repos/main/Zope/tags/*/utilities/mkzeoinstance.py
+  doc                   svn://svn.zope.org/repos/main/Zope/tags/*/doc/
+  skel                  svn://svn.zope.org/repos/main/Zope/tags/*/skel/
 </load>
 
 <distribution>

Modified: Zope/branches/philikon-zope32-integration/releases/Zope2/SETUP.cfg
===================================================================
--- Zope3/trunk/releases/Zope/SETUP.cfg	2005-10-30 17:10:32 UTC (rev 39741)
+++ Zope/branches/philikon-zope32-integration/releases/Zope2/SETUP.cfg	2005-10-30 17:56:52 UTC (rev 39747)
@@ -1,8 +1,6 @@
-documentation LICENSES.txt
-documentation ZopePublicLicense.txt
 documentation doc/*.txt
 
-script        bin/*
+script        utilities/*
 script        zopetest
 
 <data-files .>

Copied: Zope/branches/philikon-zope32-integration/releases/Zope2.cfg (from rev 39741, Zope3/trunk/releases/Zope.cfg)
===================================================================
--- Zope3/trunk/releases/Zope.cfg	2005-10-30 17:10:32 UTC (rev 39741)
+++ Zope/branches/philikon-zope32-integration/releases/Zope2.cfg	2005-10-30 17:56:52 UTC (rev 39747)
@@ -0,0 +1,6 @@
+# zpkg config file
+#
+build-application     yes
+collect-dependencies  yes
+resource-map          Zope2.map
+default-collection    Zope2

Copied: Zope/branches/philikon-zope32-integration/releases/Zope2.map (from rev 39741, Zope3/trunk/releases/Zope.map)
===================================================================
--- Zope3/trunk/releases/Zope.map	2005-10-30 17:10:32 UTC (rev 39741)
+++ Zope/branches/philikon-zope32-integration/releases/Zope2.map	2005-10-30 17:56:52 UTC (rev 39747)
@@ -0,0 +1,71 @@
+# These packages are the Zope 3 components.
+#
+docutils       ../lib/python/docutils
+pytz           ../lib/python/pytz
+zodbcode       ../lib/python/zodbcode
+zope           ../lib/python/zope
+
+# Child packages of Zope are handled separately when constructing Zope
+# distributions; this tells where to find all of them.
+zope.*         ../lib/python/zope/
+
+# These packages are copied from the ZConfig, zdaemon, and ZODB projects:
+#
+BTrees          ../lib/python/BTrees
+persistent      ../lib/python/persistent
+transaction     ../lib/python/transaction
+ThreadedAsync   ../lib/python/ThreadedAsync
+ZEO             ../lib/python/ZEO
+ZODB            ../lib/python/ZODB
+
+RestrictedPython ../lib/python/RestrictedPython
+ZConfig          ../lib/python/ZConfig
+zdaemon          ../lib/python/zdaemon
+
+AccessControl   ../lib/python/AccessControl
+Acquisition     ../lib/python/Acquisition
+App             ../lib/python/App
+ComputedAttribute../lib/python/ComputedAttribute
+DateTime        ../lib/python/DateTime
+DocumentTemplate../lib/python/DocumentTemplate
+ExtensionClass  ../lib/python/ExtensionClass
+Globals         ../lib/python/Globals
+HelpSys         ../lib/python/HelpSys
+ImageFile       ../lib/python/ImageFile
+Interface       ../lib/python/Interface
+Lifetime        ../lib/python/Lifetime
+MethodObject    ../lib/python/MethodObject
+Missing         ../lib/python/Missing
+MultiMapping    ../lib/python/MultiMapping
+OFS             ../lib/python/OFS
+Persistence     ../lib/python/Persistence
+Products        ../lib/python/Products
+Record          ../lib/python/Record
+Shared          ../lib/python/Shared
+Signals         ../lib/python/Signals
+StructuredText  ../lib/python/StructuredText
+TAL             ../lib/python/TAL
+Testing         ../lib/python/Testing
+ThreadLock      ../lib/python/ThreadLock
+TreeDisplay     ../lib/python/TreeDisplay
+ZClasses        ../lib/python/ZClasses
+ZPublisher      ../lib/python/ZPublisher
+ZServer         ../lib/python/ZServer
+ZTUtils         ../lib/python/ZTUtils         
+Zope            ../lib/python/Zope
+Zope2           ../lib/python/Zope2
+ZopeUndo        ../lib/python/ZopeUndo
+docutils        ../lib/python/docutils
+initgroups      ../lib/python/initgroups
+nt_svcutils     ../lib/python/nt_svcutils
+reStructuredText../lib/python/reStructuredText
+tempstorage     ../lib/python/tempstorage
+webdav          ../lib/python/webdav
+zExceptions     ../lib/python/zExceptions
+zLOG            ../lib/python/zLOG
+
+# These packages are the release collections based on the Zope 2
+# project; they define what goes into the Zope 2 and related
+# releases.
+#
+Zope2-src      ../releases/Zope2

Modified: Zope/branches/philikon-zope32-integration/setup.py
===================================================================
--- Zope/branches/philikon-zope32-integration/setup.py	2005-10-30 17:34:44 UTC (rev 39746)
+++ Zope/branches/philikon-zope32-integration/setup.py	2005-10-30 17:56:52 UTC (rev 39747)
@@ -1,499 +1,45 @@
-#!/usr/bin/env python2.3
-
-##############################################################################
+#############################################################################
 #
-# Copyright (c) 2002 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.
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE
+# FOR A PARTICULAR PURPOSE.
 #
 ##############################################################################
 
-"""
-Distutils setup for Zope
-
-  In-place building
-
-    This builds extension modules in-place, much like build_extensions.py
-    does.  Use 'setup.py' like this::
-
-      python setup.py build_ext -i
-
-  Installation
-
-    This builds extension modules, compiles python modules, and installs
-    everything needed to support Zope instances in the directory of
-    your choosing.  For example, to use '/usr/local/lib/zope'::
-
-      python setup.py install \
-        --home=/usr/local/lib/zope \
-        --install-platlib=/usr/local/lib/zope \
-        --install-purelib=/usr/local/lib/zope
-"""
-
-import glob
 import os
+import site
 import sys
 
-import distutils.core
+here = os.path.dirname(os.path.abspath(__file__))
+buildsupport = os.path.join(here, "buildsupport")
 
-# Override install_data to install into module directories, and to support
-# globbing on data_files.
+# Add 'buildsupport' to sys.path and process *.pth files from 'buildsupport':
+last = len(sys.path)
+site.addsitedir(buildsupport)
+if len(sys.path) > last:
+    # Move all appended directories to the start.
+    # Make sure we use ZConfig shipped with the distribution
+    new = sys.path[last:]
+    del sys.path[last:]
+    sys.path[:0] = new
 
-from distutils.command.install import install
-from distutils.command.install_data import install_data
-from distutils.util import convert_path
+import zpkgsetup.package
+import zpkgsetup.publication
+import zpkgsetup.setup
 
-class ZopeInstallData(install_data):
-    def finalize_options(self):
-        self.set_undefined_options('install',
-                                   ('install_purelib', 'install_dir'),
-                                   ('root', 'root'),
-                                   ('force', 'force'),
-                                  )
 
-    def run(self):
-        self.mkpath(self.install_dir)
-        for f in self.data_files:
-            if isinstance(f, str):
-                # it's a simple file, so copy it
-                f = convert_path(f)
-                gl = glob.glob(f)
-                if len(gl) == 0:
-                    raise distutils.core.DistutilsFileError, \
-                          "can't copy '%s': no matching files" % f
-                for g in gl:
-                    if os.path.isfile(g):
-                        if self.warn_dir:
-                            self.warn("setup script did not provide a "
-                                      "directory for '%s' -- installing "
-                                      "right in '%s'" %
-                                      (g, self.install_dir))
-                        (out, _) = self.copy_file(g, self.install_dir)
-                        self.outfiles.append(out)
-            else:
-                # it's a tuple with path to install to and a list of files
-                dir = convert_path(f[0])
-                if not os.path.isabs(dir):
-                    dir = os.path.join(self.install_dir, dir)
-                elif self.root:
-                    dir = change_root(self.root, dir)
-                self.mkpath(dir)
-                for data in f[1]:
-                    data = convert_path(data)
-                    gl = glob.glob(data)
-                    if len(gl) == 0:
-                        raise distutils.core.DistutilsFileError, \
-                              "can't copy '%s': no matching files" % data
-                    for g in gl:
-                        if os.path.isfile(g):
-                            (out, _) = self.copy_file(g, dir)
-                            self.outfiles.append(out)
+context = zpkgsetup.setup.SetupContext(
+    "Zope", "2.8.42", __file__)
 
-# We create a custom "install scheme" that works the same way on all
-# platforms.  We do this in order to prevent distutils from trying to
-# guess where to put our files on a per-platform basis.
+context.load_metadata(
+    os.path.join(here, "releases", "Zope2",
+                 zpkgsetup.publication.PUBLICATION_CONF))
 
-ZOPE_INSTALL_SCHEME = {
-    'purelib': '$base/lib/python',
-    'platlib': '$base/lib/python',
-    'headers': '$base/lib/python',
-    'scripts': '$base/bin',
-    'data'   : '$base/lib/python',
-    }
-
-class ZopeInstall(install):
-    # give distutils install step knowledge about build file placement options
-    user_options = install.user_options + [
-        ('build-base=', None, 'base directory for build library'),
-        ('build-lib=', None, 'build directory for all distribution'),
-        ('build-scripts=', None, 'build directory for scripts'),
-        ('build-temp=', None, 'temporary build directory'),
-        ]
-    build_scripts = None
-    build_temp = None
-
-    def run(self):
-        """ Override run to pass along build location info so
-        we can use custom build directories """
-        build = self.distribution.get_command_obj('build')
-        build.build_base = self.build_base
-        build.build_lib = self.build_lib
-        build.build_scripts = self.build_scripts
-        build.build_temp = self.build_temp
-
-        install.run(self)
-
-    def select_scheme(self, name):
-        """
-        Override the default platform installation schemes, ignoring whatever
-        'name' is passed in.  For our purposes, we want to put all library,
-        header, and data into [install_base]/lib/python.  Comment
-        this method out to achieve distutils-standard platform-specific
-        behavior for 'setup.py install'.  This is most useful if you set the
-        [install-base] by using the '--prefix' or '--home' flags on the
-        setup.py install command line.  Otherwise, all Zope software
-        will probably be installed to your Python's 'lib/python' directory.
-        """
-        scheme = ZOPE_INSTALL_SCHEME
-        import distutils.command.install
-        for key in distutils.command.install.SCHEME_KEYS:
-            attrname = 'install_' + key
-            if getattr(self, attrname) is None:
-                setattr(self, attrname, scheme[key])
-
-class ZopeDistribution(distutils.core.Distribution):
-    def __init__(self, attrs):
-        distutils.core.Distribution.__init__(self, attrs)
-        self.cmdclass["install"] = ZopeInstall
-        self.cmdclass["install_data"] = ZopeInstallData
-
-# presumes this script lives in the base dir
-BASE_DIR=os.path.dirname(os.path.abspath(sys.argv[0]))
-
-AUTHOR = 'Zope Corporation and Contributors'
-
-# Most modules are in lib/python in the source distribution
-PACKAGES_ROOT = os.path.join(BASE_DIR, 'lib', 'python')
-os.chdir(PACKAGES_ROOT)
-
-
-# Most of this is ripped from the Zope 3 setup.py.
-
-from distutils import dir_util
-from distutils.command.build import build as buildcmd
-from distutils.command.build_ext import build_ext
-from distutils.command.install_lib import install_lib as installcmd
-from distutils.core import setup
-from distutils.dist import Distribution
-from distutils.extension import Extension
-
-
-# This class serves multiple purposes.  It walks the file system looking for
-# auxiliary files that distutils doesn't install properly, and it actually
-# copies those files (when hooked into by distutils).  It also walks the file
-# system looking for candidate packages for distutils to install as normal.
-# The key here is that the package must have an __init__.py file.
-class Finder:
-    def __init__(self, ignore, prefix):
-        self._files = []
-        self._pkgs = {}
-        self._ignore = ignore
-        # We're finding packages in lib/python in the source dir, but we're
-        # copying them directly under build/lib.<plat>.  So we need to lop off
-        # the prefix when calculating the package names from the file names.
-        self._plen = len(prefix) + 1
-
-    def visit(self, dir, files):
-        # First see if this is one of the packages we want to add, or if
-        # we're really skipping this package.
-        if '__init__.py' in files:
-            aspkg = dir[self._plen:].replace(os.sep, '.')
-            self._pkgs[aspkg] = True
-            ignore = ('.py',) + self._ignore
-        else:
-            ignore = self._ignore
-        # Add any extra files we're interested in
-        for file in files:
-            base, ext = os.path.splitext(file)
-            if ext not in ignore:
-                self._files.append(os.path.join(dir, file))
-
-    def copy_files(self, cmd, outputbase):
-        for file in self._files:
-            dest = os.path.join(outputbase, file[self._plen:])
-            # Make sure the destination directory exists
-            dir = os.path.dirname(dest)
-            if not os.path.exists(dir):
-                dir_util.mkpath(dir)
-            cmd.copy_file(file, dest)
-
-    def get_packages(self):
-        return self._pkgs.keys()
-
-def remove_stale_bytecode(arg, dirname, names):
-    names = map(os.path.normcase, names)
-    for name in names:
-        if name.endswith(".pyc") or name.endswith(".pyo"):
-            srcname = name[:-1]
-            if srcname not in names:
-                fullname = os.path.join(dirname, name)
-                print "Removing stale bytecode file", fullname
-                os.unlink(fullname)
-
-# Create the finder instance, which will be used in lots of places.  `finder'
-# is the global we're most interested in.
-IGNORE_EXTS = ('.pyc', '.pyo', '.c', '.h', '.so', '.cfg')
-finder = Finder(IGNORE_EXTS, PACKAGES_ROOT)
-
-for dirpath, dirnames, filenames in os.walk(PACKAGES_ROOT):
-    if not '.svn' in dirpath:
-        finder.visit(dirpath, filenames)
-packages = finder.get_packages()
-
-# Distutils hook classes
-class MyBuilder(buildcmd):
-    def run(self):
-        os.path.walk(os.curdir, remove_stale_bytecode, None)
-        buildcmd.run(self)
-        finder.copy_files(self, self.build_lib)
-
-class MyExtBuilder(build_ext):
-    # Override the default build_ext to remove stale bytecodes.
-    # Technically, removing bytecode has nothing to do with
-    # building extensions, but Zope's the build_ext -i variant
-    # is used to build Zope in place.
-    def run(self):
-        os.path.walk(os.curdir, remove_stale_bytecode, None)
-        build_ext.run(self)
-
-class MyLibInstaller(installcmd):
-    def run(self):
-        installcmd.run(self)
-        finder.copy_files(self, self.install_dir)
-
-class MyDistribution(Distribution):
-    # To control the selection of MyLibInstaller and MyPyBuilder, we
-    # have to set it into the cmdclass instance variable, set in
-    # Distribution.__init__().
-    def __init__(self, *attrs):
-        Distribution.__init__(self, *attrs)
-        self.cmdclass['install'] = ZopeInstall
-        self.cmdclass['build'] = MyBuilder
-        self.cmdclass['build_ext'] = MyExtBuilder
-        self.cmdclass['install_lib'] = MyLibInstaller
-
-
-# added . to EXTENSIONCLASS_INCLUDEDIRS in order to be able to compile
-# ZODB HEAD code (which uses qualified paths to find header files).  This
-# should be a temporary change, thrown away once we use zpkg to package
-# Zope.
-EXTENSIONCLASS_INCLUDEDIRS = ['ExtensionClass', '.'] 
-
-# All extension modules must be listed here.
-ext_modules = [
-
-    # AccessControl
-    Extension(name='AccessControl.cAccessControl',
-              include_dirs=EXTENSIONCLASS_INCLUDEDIRS+['Acquisition'],
-              sources=['AccessControl/cAccessControl.c'],
-              depends=['ExtensionClass/ExtensionClass.h',
-                       'ExtensionClass/pickle/pickle.c',
-                       'Acquisition/Acquisition.h']),
-
-    # BTrees
-    Extension(name='BTrees._OOBTree',
-              include_dirs=EXTENSIONCLASS_INCLUDEDIRS+['persistent'],
-              sources=['BTrees/_OOBTree.c']),
-    Extension(name='BTrees._OIBTree',
-              include_dirs=EXTENSIONCLASS_INCLUDEDIRS+['persistent'],
-              sources=['BTrees/_OIBTree.c']),
-    Extension(name='BTrees._IIBTree',
-              include_dirs=EXTENSIONCLASS_INCLUDEDIRS+['persistent'],
-              define_macros=[('EXCLUDE_INTSET_SUPPORT', None)],
-              sources=['BTrees/_IIBTree.c']),
-    Extension(name='BTrees._IOBTree',
-              include_dirs=EXTENSIONCLASS_INCLUDEDIRS+['persistent'],
-              define_macros=[('EXCLUDE_INTSET_SUPPORT', None)],
-              sources=['BTrees/_IOBTree.c']),
-    Extension(name='BTrees._IFBTree',
-              include_dirs=EXTENSIONCLASS_INCLUDEDIRS+['persistent'],
-              define_macros=[('EXCLUDE_INTSET_SUPPORT', None)],
-              sources=['BTrees/_IFBTree.c']),
-    Extension(name='BTrees._fsBTree',
-              include_dirs=EXTENSIONCLASS_INCLUDEDIRS+['persistent'],
-              define_macros=[('EXCLUDE_INTSET_SUPPORT', None)],
-              sources=['BTrees/_fsBTree.c']),
-
-    # DocumentTemplate
-    Extension(name='DocumentTemplate.cDocumentTemplate',
-              include_dirs=EXTENSIONCLASS_INCLUDEDIRS,
-              sources=['DocumentTemplate/cDocumentTemplate.c']),
-
-    # ExtensionClass
-    Extension(name='ExtensionClass._ExtensionClass',
-              include_dirs=EXTENSIONCLASS_INCLUDEDIRS,
-              sources=["ExtensionClass/_ExtensionClass.c"],
-              depends=["ExtensionClass/ExtensionClass.h"]),
-    Extension(name='Acquisition._Acquisition',
-              include_dirs=EXTENSIONCLASS_INCLUDEDIRS,
-              sources=["Acquisition/_Acquisition.c"],
-              depends=["ExtensionClass/ExtensionClass.h",
-                       "Acquisition/Acquisition.h"]),
-    Extension(name='MethodObject._MethodObject',
-              include_dirs=EXTENSIONCLASS_INCLUDEDIRS,
-              sources=["MethodObject/_MethodObject.c"],
-              depends=["ExtensionClass/ExtensionClass.h"]),
-    Extension(name='MultiMapping._MultiMapping',
-              include_dirs=EXTENSIONCLASS_INCLUDEDIRS,
-              sources=["MultiMapping/_MultiMapping.c"],
-              depends=["ExtensionClass/ExtensionClass.h"]),
-    Extension(name='ThreadLock._ThreadLock',
-              include_dirs=EXTENSIONCLASS_INCLUDEDIRS,
-              sources=["ThreadLock/_ThreadLock.c"],
-              depends=["ExtensionClass/ExtensionClass.h"]),
-    Extension(name='Missing._Missing',
-              include_dirs=EXTENSIONCLASS_INCLUDEDIRS,
-              sources=["Missing/_Missing.c"],
-              depends=["ExtensionClass/ExtensionClass.h"]),
-    Extension(name='Record._Record',
-              include_dirs=EXTENSIONCLASS_INCLUDEDIRS,
-              sources=["Record/_Record.c"],
-              depends=["ExtensionClass/ExtensionClass.h"]),
-    Extension(name='ComputedAttribute._ComputedAttribute',
-              include_dirs=EXTENSIONCLASS_INCLUDEDIRS,
-              sources=["ComputedAttribute/_ComputedAttribute.c"],
-              depends=["ExtensionClass/ExtensionClass.h"]),
-
-    # initgroups
-    Extension(name='initgroups._initgroups',
-              sources=['initgroups/_initgroups.c']),
-
-    # indexes
-    Extension(name='Products.PluginIndexes.TextIndex.Splitter.ZopeSplitter.ZopeSplitter',
-              sources=['Products/PluginIndexes/TextIndex/Splitter/ZopeSplitter/src/ZopeSplitter.c']),
-    Extension(name='Products.PluginIndexes.TextIndex.Splitter.ISO_8859_1_Splitter.ISO_8859_1_Splitter',
-              sources=['Products/PluginIndexes/TextIndex/Splitter/ISO_8859_1_Splitter/src/ISO_8859_1_Splitter.c']),
-    Extension(name='Products.PluginIndexes.TextIndex.Splitter.UnicodeSplitter.UnicodeSplitter',
-              sources=['Products/PluginIndexes/TextIndex/Splitter/UnicodeSplitter/src/UnicodeSplitter.c']),
-    Extension(name='Products.ZCTextIndex.stopper',
-              sources=['Products/ZCTextIndex/stopper.c']),
-    Extension(name='Products.ZCTextIndex.okascore',
-              sources=['Products/ZCTextIndex/okascore.c']),
-
-    #ZODB
-    Extension(name = 'persistent.cPersistence',
-              include_dirs = ['persistent'],
-              sources= ['persistent/cPersistence.c',
-                        'persistent/ring.c'],
-              depends = ['persistent/cPersistence.h',
-                         'persistent/ring.h',
-                         'persistent/ring.c']
-              ),
-    Extension(name = 'Persistence._Persistence',
-              include_dirs = ['persistent', 'ExtensionClass'],
-              sources = ['Persistence/_Persistence.c'],
-              depends = ['persistent/cPersistence.h',
-                         'ExtensionClass/ExtensionClass.h']
-              ),
-    Extension(name = 'persistent.cPickleCache',
-              include_dirs = ['persistent'],
-              sources= ['persistent/cPickleCache.c',
-                        'persistent/ring.c'],
-              depends = ['persistent/cPersistence.h',
-                         'persistent/ring.h',
-                         'persistent/ring.c']
-              ),
-    Extension(name = 'persistent.TimeStamp',
-              sources= ['persistent/TimeStamp.c']
-              ),
-    Extension(name = 'ZODB.winlock',
-              sources = ['ZODB/winlock.c']
-              ),
-
-    #zope
-    Extension("zope.proxy._zope_proxy_proxy",
-              ["zope/proxy/_zope_proxy_proxy.c"],
-              include_dirs = ["zope/proxy"],
-              depends = ["zope/proxy/proxy.h"]),
-
-    Extension("zope.security._proxy", ["zope/security/_proxy.c"],
-              include_dirs = ["zope/proxy"],
-              depends = ["zope/proxy/proxy.h"]),
-
-    Extension("zope.security._zope_security_checker",
-              ["zope/security/_zope_security_checker.c"],
-              include_dirs = [],
-              depends = []),
-
-    Extension("zope.interface._zope_interface_coptimizations",
-              ["zope/interface/_zope_interface_coptimizations.c"]),
-
-    Extension("zope.hookable._zope_hookable",
-              ["zope/hookable/_zope_hookable.c"]),
-
-    Extension("zope.thread._zope_thread",
-              ["zope/thread/_zope_thread.c"]),
-
-    Extension("zope.app.container._zope_app_container_contained",
-              ["zope/app/container/_zope_app_container_contained.c"],
-              include_dirs = ["persistent",
-                              "zope/proxy",
-                              "zope/app/container"],
-              depends = [
-                 "persistent/cPersistence.h",
-                 "zope/proxy/_zope_proxy_proxy.c",
-                 ]),
-
-    ]
-
-# We're using the module docstring as the distutils descriptions.
-doclines = __doc__.split("\n")
-
-setup(name='Zope',
-      author=AUTHOR,
-      version="2.8",
-      maintainer="Zope Corporation",
-      maintainer_email="zope-dev at zope.org",
-      url = "http://www.zope.org/",
-      ext_modules = ext_modules,
-      license = "http://www.zope.org/Resources/ZPL",
-      platforms = ["any"],
-      description = doclines[0],
-      long_description = "\n".join(doclines[2:]),
-      packages = packages,
-      distclass = MyDistribution,
-      )
-
-# The rest of these modules live in the root of the source tree
-os.chdir(BASE_DIR)
-
-IGNORE_NAMES = (
-    'CVS', '.svn', # Revision Control Directories
-    )
-
-def skel_visit(skel, dirname, names):
-    for ignore in IGNORE_NAMES:
-        if ignore in names:
-            names.remove(ignore)
-    L = []
-    for name in names:
-        if os.path.isfile(os.path.join(dirname, name)):
-            L.append("%s/%s" % (dirname, name))
-    skel.append(("../../" + dirname, L))
-
-installed_data_files = [
-    ["../../doc", ['doc/*.txt']],
-    ["../../import", ['import/*.zexp']],
-    ["../../bin", ['utilities/README.txt']],
-    ]
-
-os.path.walk("skel", skel_visit, installed_data_files)
-
-setup(
-    name='Zope',
-    author=AUTHOR,
-
-    data_files=installed_data_files,
-    scripts=["utilities/mkzeoinstance.py", "utilities/mkzopeinstance.py",
-             "utilities/check_catalog.py", "utilities/load_site.py",
-             "utilities/requestprofiler.py", "utilities/zpasswd.py",
-             "utilities/copyzopeskel.py", "utilities/reindex_catalog.py",
-             "utilities/compilezpy.py", "utilities/decompilezpy.py",
-             "utilities/ZODBTools/timeout.py", "utilities/ZODBTools/analyze.py",
-             "utilities/ZODBTools/checkbtrees.py", "utilities/ZODBTools/fsdump.py",
-             "utilities/ZODBTools/fsrefs.py" , "utilities/ZODBTools/fstail.py",
-             "utilities/ZODBTools/fstest.py", "utilities/ZODBTools/migrate.py",
-             "utilities/ZODBTools/netspace.py", "utilities/ZODBTools/parsezeolog.py",
-             "utilities/ZODBTools/repozo.py", "utilities/ZODBTools/space.py",
-             "utilities/ZODBTools/timeout.py", "utilities/ZODBTools/zeopack.py",
-             "utilities/ZODBTools/zeoqueue.py", "utilities/ZODBTools/zeoreplay.py",
-             "utilities/ZODBTools/zeoserverlog.py", "utilities/ZODBTools/zeoup.py",
-             "utilities/ZODBTools/zodbload.py",
-             "test.py"],
-    distclass=ZopeDistribution,
-    )
+context.walk_packages("src")
+context.setup()



More information about the Zope-Checkins mailing list