[Zope3-checkins] SVN: Zope3/trunk/ Merge revisions 37851,
37882 from the Zope-3.1 branch:
Fred L. Drake, Jr.
fdrake at gmail.com
Fri Aug 12 11:25:08 EDT 2005
Log message for revision 37889:
Merge revisions 37851, 37882 from the Zope-3.1 branch:
Log message for revision 37851:
reduce zpkg configuration cruft; relies on a moderately recent zpkg checkout
(earlier this week)
Log message for revision 37882:
Move to a zpkg-based setup:
- Switch to ZODB 3.5.0a7.
- References to headers now involve the package names.
- The setup.py in the checkout can only be used for "in-place" builds
(setup.py build_ext -i); you can't do out-of-place builds or
installations directly from a checkout (use a distribution package
for that).
- If you add C code to a package, make sure to update/create the
SETUP.cfg for that package, and make sure that package is listed in
setup.py at the top. (I expect we'll remove that last step before
too long.)
Changed:
_U Zope3/trunk/
U Zope3/trunk/Makefile
U Zope3/trunk/releases/Zope.cfg
D Zope3/trunk/releases/Zope.map
U Zope3/trunk/setup.py
_U Zope3/trunk/src/
U Zope3/trunk/src/zope/app/container/_zope_app_container_contained.c
U Zope3/trunk/src/zope/app/container/_zope_proxy_proxy.c
U Zope3/trunk/src/zope/security/_proxy.c
-=-
Property changes on: Zope3/trunk
___________________________________________________________________
Name: svn:externals
+ zpkgsetup svn://svn.zope.org/repos/main/zpkgtools/trunk/zpkgsetup
Modified: Zope3/trunk/Makefile
===================================================================
--- Zope3/trunk/Makefile 2005-08-12 14:00:26 UTC (rev 37888)
+++ Zope3/trunk/Makefile 2005-08-12 15:25:08 UTC (rev 37889)
@@ -1,4 +1,4 @@
-PYTHON=python
+PYTHON=python2.3
TESTFLAGS=-v
TESTOPTS=
SETUPFLAGS=
@@ -10,9 +10,6 @@
inplace:
$(PYTHON) setup.py $(SETUPFLAGS) build_ext -i
-build:
- $(PYTHON) setup.py $(SETUPFLAGS) build
-
runners: bin/runzope
bin/runzope: Makefile
@@ -20,15 +17,9 @@
echo "exec $(PYTHON) z3.py" >> bin/runzope;
chmod +x bin/runzope
-test_build: build
- $(PYTHON) test.py $(TESTFLAGS) $(TESTOPTS)
-
test_inplace: inplace
$(PYTHON) test.py $(TESTFLAGS) $(TESTOPTS)
-ftest_build: build
- $(PYTHON) test.py -f $(TESTFLAGS) $(TESTOPTS)
-
ftest_inplace: inplace
$(PYTHON) test.py -f $(TESTFLAGS) $(TESTOPTS)
Modified: Zope3/trunk/releases/Zope.cfg
===================================================================
--- Zope3/trunk/releases/Zope.cfg 2005-08-12 14:00:26 UTC (rev 37888)
+++ Zope3/trunk/releases/Zope.cfg 2005-08-12 15:25:08 UTC (rev 37889)
@@ -1,6 +1,45 @@
# zpkg config file
#
-# To getnerate a Zope release, use:
-#
-resource-map Zope.map
-resource-map svn://svn.zope.org/repos/main/ReleaseSupport/trunk/PackageMaps/support.map
+build-application yes
+collect-dependencies yes
+
+<resources>
+ # These packages are the Zope 3 components.
+ #
+ docutils ../src/docutils
+ pytz ../src/pytz
+ zodbcode ../src/zodbcode
+ zope ../src/zope
+
+ # Child packages of Zope are handled separately when constructing Zope
+ # distributions; this tells where to find all of them.
+ zope.* ../src/zope/
+
+ # Related components for use with Zope 3:
+ buddydemo ../src/buddydemo
+ z3checkins ../src/z3checkins
+
+ # These packages are copied from the ZConfig, zdaemon, and ZODB projects:
+ #
+ BTrees ../src/BTrees
+ persistent ../src/persistent
+ transaction ../src/transaction
+ ThreadedAsync ../src/ThreadedAsync
+ ZEO ../src/ZEO
+ ZODB ../src/ZODB
+
+ RestrictedPython ../src/RestrictedPython
+ ZConfig ../src/ZConfig
+ zdaemon ../src/zdaemon
+
+ # These packages are the release collections based on the Zope 3
+ # project; they define what goes into the Zope X3 and related
+ # releases.
+ #
+ Zope-win ../releases/Zope-win
+ Zope ../releases/Zope
+ Zope-src ../releases/Zope
+ ZopeInterface ../releases/ZopeInterface
+ Workflow ../releases/Workflow
+ ZPT ../releases/ZPT
+</resources>
Deleted: Zope3/trunk/releases/Zope.map
===================================================================
--- Zope3/trunk/releases/Zope.map 2005-08-12 14:00:26 UTC (rev 37888)
+++ Zope3/trunk/releases/Zope.map 2005-08-12 15:25:08 UTC (rev 37889)
@@ -1,44 +0,0 @@
-# These packages are used to provide the Zope 3 distributions.
-# This package map can be addressed as
-#
-# svn://svn.zope.org/repos/main/ReleaseSupport/trunk/PackageMaps/zope3.map
-
-# These packages are the Zope 3 components.
-#
-docutils ../src/docutils
-pytz ../src/pytz
-zodbcode ../src/zodbcode
-zope ../src/zope
-# Child packages of Zope are handled separately when constructing Zope
-# distributions; this tells where to find all of them.
-zope.* ../src/zope/
-
-# Related components for use with Zope 3:
-buddydemo ../src/buddydemo
-z3checkins ../src/z3checkins
-
-# These packages are copied from the ZConfig, zdaemon, and ZODB projects:
-#
-BTrees ../src/BTrees
-persistent ../src/persistent
-transaction ../src/transaction
-ThreadedAsync ../src/ThreadedAsync
-ZEO ../src/ZEO
-ZODB ../src/ZODB
-
-RestrictedPython ../src/RestrictedPython
-ZConfig ../src/ZConfig
-zdaemon ../src/zdaemon
-
-
-# These packages are the release collections based on the Zope 3
-# project; they define what goes into the Zope X3 and related
-# releases.
-#
-Zope-win ../releases/Zope-win
-Zope ../releases/Zope
-Zope-src ../releases/Zope
-ZopeInterface ../releases/ZopeInterface
-Workflow ../releases/Workflow
-ZPT ../releases/ZPT
-
Modified: Zope3/trunk/setup.py
===================================================================
--- Zope3/trunk/setup.py 2005-08-12 14:00:26 UTC (rev 37888)
+++ Zope3/trunk/setup.py 2005-08-12 15:25:08 UTC (rev 37889)
@@ -12,261 +12,43 @@
#
##############################################################################
-"""Zope application server
-
-Zope is a leading open source application server, specializing in content
-management, portals, and custom applications. Zope enables teams to
-collaborate in the creation and management of dynamic web-based business
-applications such as intranets and portals.
-"""
-
-classifiers = """\
-Development Status :: 3 - Alpha
-Environment :: Web Environment
-License :: OSI Approved :: Zope Public License
-Operating System :: Microsoft :: Windows
-Operating System :: Unix
-Programming Language :: Python
-Topic :: Internet :: WWW/HTTP
-Topic :: Internet :: WWW/HTTP :: Dynamic Content
-Topic :: Software Development :: Libraries :: Python Modules
-"""
-
import os
+import posixpath
+import sys
-# Provide a bunch of custom components that make it possible to build and
-# install non-.py files into the package destinations.
-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
+import zpkgsetup.setup
-# We have to snoop for file types that distutils doesn't copy correctly when
-# doing a non-build-in-place.
-EXTS = ['.conf', '.css', '.dtd', '.gif', '.jpg', '.html',
- '.js', '.mo', '.png', '.pt', '.stx', '.ref',
- '.txt', '.xml', '.zcml', '.mar', '.in', '.sample',
- ]
+here = os.path.dirname(os.path.abspath(__file__))
-IGNORE_NAMES = (
- 'CVS', '.svn', # Revision Control Directories
- )
+def join(*parts):
+ local_full_path = os.path.join(here, *parts)
+ relative_path = posixpath.join(*parts)
+ return local_full_path, relative_path
-# 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, exts, prefix):
- self._files = []
- self._pkgs = {}
- self._exts = exts
- # 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)
- def visit(self, ignore, dir, files):
- # Remove ignored filenames
- for name in IGNORE_NAMES:
- if name in files:
- files.remove(name)
- for file in 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
- # Add any extra files we're interested in
- base, ext = os.path.splitext(file)
- if ext in self._exts:
- self._files.append(os.path.join(dir, file))
+context = zpkgsetup.setup.SetupContext(
+ "Zope", "3.1.0a42", __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)
+context.load_metadata(
+ os.path.join(here, "releases", "Zope", "PUBLICATION.cfg"))
- 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.
-basedir = 'src/'
-finder = Finder(EXTS, basedir)
-os.path.walk(basedir, finder.visit, None)
-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['build'] = MyBuilder
- self.cmdclass['build_ext'] = MyExtBuilder
- self.cmdclass['install_lib'] = MyLibInstaller
-
-
-# Set up dependencies for the BTrees package
-base_btrees_depends = [
- "src/persistent/cPersistence.h",
- "src/BTrees/BTreeItemsTemplate.c",
- "src/BTrees/BTreeModuleTemplate.c",
- "src/BTrees/BTreeTemplate.c",
- "src/BTrees/BucketTemplate.c",
- "src/BTrees/MergeTemplate.c",
- "src/BTrees/SetOpTemplate.c",
- "src/BTrees/SetTemplate.c",
- "src/BTrees/TreeSetTemplate.c",
- "src/BTrees/sorters.c",
- ]
-
-_flavors = {"O": "object", "I": "int", "F": "float"}
-
-KEY_H = "src/BTrees/%skeymacros.h"
-VALUE_H = "src/BTrees/%svaluemacros.h"
-
-
-def BTreeExtension(flavor):
- key = flavor[0]
- value = flavor[1]
- name = "BTrees._%sBTree" % flavor
- sources = ["src/BTrees/_%sBTree.c" % flavor]
- kwargs = {"include_dirs": ['src/persistent']}
- if flavor != "fs":
- kwargs["depends"] = (base_btrees_depends + [KEY_H % _flavors[key],
- VALUE_H % _flavors[value]])
- return Extension(name, sources, **kwargs)
-
-# All Zope3 extension modules must be listed here.
-ext_modules = [
- BTreeExtension("OO"),
- BTreeExtension("IO"),
- BTreeExtension("OI"),
- BTreeExtension("II"),
- BTreeExtension("IF"),
- BTreeExtension("fs"),
- Extension(name = 'persistent.cPersistence',
- include_dirs = ['src/persistent'],
- sources= ['src/persistent/cPersistence.c',
- 'src/persistent/ring.c'],
- depends = ['src/persistent/cPersistence.h',
- 'src/persistent/ring.h',
- 'src/persistent/ring.c']
- ),
- Extension(name = 'persistent.cPickleCache',
- include_dirs = ['src/persistent'],
- sources= ['src/persistent/cPickleCache.c',
- 'src/persistent/ring.c'],
- depends = ['src/persistent/cPersistence.h',
- 'src/persistent/ring.h',
- 'src/persistent/ring.c']
- ),
- Extension(name = 'persistent.TimeStamp',
- sources= ['src/persistent/TimeStamp.c']
- ),
- Extension(name = 'ZODB.winlock',
- sources = ['src/ZODB/winlock.c']
- ),
- Extension("zope.i18nmessageid._zope_i18nmessageid_message",
- ["src/zope/i18nmessageid/_zope_i18nmessageid_message.c"],
- ),
-
- Extension("zope.proxy._zope_proxy_proxy",
- ["src/zope/proxy/_zope_proxy_proxy.c"],
- include_dirs = ["src/zope/proxy"],
- depends = ["src/zope/proxy/proxy.h"]),
-
- Extension("zope.security._proxy", ["src/zope/security/_proxy.c"],
- include_dirs = ["src/zope/proxy"],
- depends = ["src/zope/proxy/proxy.h"]),
-
- Extension("zope.security._zope_security_checker",
- ["src/zope/security/_zope_security_checker.c"],
- include_dirs = [],
- depends = []),
-
- Extension("zope.interface._zope_interface_coptimizations",
- ["src/zope/interface/_zope_interface_coptimizations.c"]),
-
- Extension("zope.hookable._zope_hookable",
- ["src/zope/hookable/_zope_hookable.c"]),
-
- Extension("zope.thread._zope_thread",
- ["src/zope/thread/_zope_thread.c"]),
-
- Extension("zope.app.container._zope_app_container_contained",
- ["src/zope/app/container/_zope_app_container_contained.c"],
- include_dirs = ["src/persistent",
- "src/zope/proxy",
- "src/zope/app/container"],
- depends = [
- "src/persistent/cPersistence.h",
- "src/zope/proxy/_zope_proxy_proxy.c",
- ]),
-
- ]
-
-# We're using the module docstring as the distutils descriptions.
-doclines = __doc__.split("\n")
-
-setup(name="Zope",
- version="3.0m5",
- maintainer="Zope Corporation",
- maintainer_email="zope3-dev at zope.org",
- url = "http://dev.zope.org/Zope3/",
- ext_modules = ext_modules,
- # This doesn't work right at all
- headers = ["src/persistent/cPersistence.h",
- "src/zope/proxy/proxy.h"],
- scripts = ["z3.py", "utilities/runurl.py"],
- license = "http://www.zope.org/Resources/ZPL",
- platforms = ["any"],
- description = doclines[0],
- classifiers = filter(None, classifiers.split("\n")),
- long_description = "\n".join(doclines[2:]),
- packages = packages,
- package_dir = {'': 'src'},
- distclass = MyDistribution,
- )
+#context.scan("Zope", *join("releases", "Zope"))
+context.scan("BTrees", *join("src", "BTrees"))
+context.scan("persistent", *join("src", "persistent"))
+context.scan("ThreadedAsync", *join("src", "ThreadedAsync"))
+context.scan("transaction", *join("src", "transaction"))
+context.scan("ZConfig", *join("src", "ZConfig"))
+context.scan("zdaemon", *join("src", "zdaemon"))
+context.scan("ZEO", *join("src", "ZEO"))
+context.scan("ZODB", *join("src", "ZODB"))
+context.scan("zope", *join("src", "zope"))
+context.scan("zope.hookable", *join("src", "zope", "hookable"))
+context.scan("zope.i18nmessageid", *join("src", "zope", "i18nmessageid"))
+context.scan("zope.interface", *join("src", "zope", "interface"))
+context.scan("zope.proxy", *join("src", "zope", "proxy"))
+context.scan("zope.security", *join("src", "zope", "security"))
+context.scan("zope.testing", *join("src", "zope", "testing"))
+context.scan("zope.thread", *join("src", "zope", "thread"))
+context.scan("zope.app.container", *join("src", "zope", "app", "container"))
+context.setup()
Property changes on: Zope3/trunk/src
___________________________________________________________________
Name: svn:externals
- ZConfig svn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3
zdaemon svn://svn.zope.org/repos/main/zdaemon/tags/zdaemon-1.1
BTrees svn://svn.zope.org/repos/main/ZODB/tags/3.5.0a6/src/BTrees
persistent svn://svn.zope.org/repos/main/ZODB/tags/3.5.0a6/src/persistent
ThreadedAsync svn://svn.zope.org/repos/main/ZODB/tags/3.5.0a6/src/ThreadedAsync
transaction svn://svn.zope.org/repos/main/ZODB/tags/3.5.0a6/src/transaction
ZEO svn://svn.zope.org/repos/main/ZODB/tags/3.5.0a6/src/ZEO
ZODB svn://svn.zope.org/repos/main/ZODB/tags/3.5.0a6/src/ZODB
+ ZConfig svn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3
zdaemon svn://svn.zope.org/repos/main/zdaemon/tags/zdaemon-1.1
BTrees svn://svn.zope.org/repos/main/ZODB/tags/3.5.0a7/src/BTrees
persistent svn://svn.zope.org/repos/main/ZODB/tags/3.5.0a7/src/persistent
ThreadedAsync svn://svn.zope.org/repos/main/ZODB/tags/3.5.0a7/src/ThreadedAsync
transaction svn://svn.zope.org/repos/main/ZODB/tags/3.5.0a7/src/transaction
ZEO svn://svn.zope.org/repos/main/ZODB/tags/3.5.0a7/src/ZEO
ZODB svn://svn.zope.org/repos/main/ZODB/tags/3.5.0a7/src/ZODB
Modified: Zope3/trunk/src/zope/app/container/_zope_app_container_contained.c
===================================================================
--- Zope3/trunk/src/zope/app/container/_zope_app_container_contained.c 2005-08-12 14:00:26 UTC (rev 37888)
+++ Zope3/trunk/src/zope/app/container/_zope_app_container_contained.c 2005-08-12 15:25:08 UTC (rev 37889)
@@ -32,7 +32,7 @@
#include "Python.h"
-#include "cPersistence.h"
+#include "persistent/cPersistence.h"
static PyObject *str_p_deactivate;
Modified: Zope3/trunk/src/zope/app/container/_zope_proxy_proxy.c
===================================================================
--- Zope3/trunk/src/zope/app/container/_zope_proxy_proxy.c 2005-08-12 14:00:26 UTC (rev 37888)
+++ Zope3/trunk/src/zope/app/container/_zope_proxy_proxy.c 2005-08-12 15:25:08 UTC (rev 37889)
@@ -28,7 +28,7 @@
#include "modsupport.h"
#define PROXY_MODULE
-#include "proxy.h"
+#include "zope.proxy/proxy.h"
static PyTypeObject ProxyType;
Modified: Zope3/trunk/src/zope/security/_proxy.c
===================================================================
--- Zope3/trunk/src/zope/security/_proxy.c 2005-08-12 14:00:26 UTC (rev 37888)
+++ Zope3/trunk/src/zope/security/_proxy.c 2005-08-12 15:25:08 UTC (rev 37889)
@@ -17,7 +17,7 @@
*/
#include <Python.h>
-#include "proxy.h"
+#include "zope.proxy/proxy.h"
static PyObject *__class__str = 0, *__name__str = 0, *__module__str = 0;
More information about the Zope3-Checkins
mailing list