[Zodb-checkins] SVN: ZODB/trunk/ merged branches/tseaver-btrees_as_egg, splitting btrees into separate project

jim cvs-admin at zope.org
Wed Nov 7 12:14:32 UTC 2012


Log message for revision 128184:
  merged branches/tseaver-btrees_as_egg, splitting btrees into separate project

Changed:
  U   ZODB/trunk/CHANGES.txt
  U   ZODB/trunk/buildout.cfg
  U   ZODB/trunk/setup.py
  D   ZODB/trunk/src/BTrees/

-=-
Modified: ZODB/trunk/CHANGES.txt
===================================================================
--- ZODB/trunk/CHANGES.txt	2012-11-06 17:58:17 UTC (rev 128183)
+++ ZODB/trunk/CHANGES.txt	2012-11-07 12:14:31 UTC (rev 128184)
@@ -8,8 +8,8 @@
 New Features
 ------------
 
-- The ``persistent`` package is now released as a separate distribution,
-  on which ZODB now depends.
+- The ``persistent`` and ``BTrees`` packages are now released as separate
+  distributions, on which ZODB now depends.
 
 - ZODB no longer depends on zope.event.  It now uses ZODB.event, which
   uses zope.event if it is installed.  You can override

Modified: ZODB/trunk/buildout.cfg
===================================================================
--- ZODB/trunk/buildout.cfg	2012-11-06 17:58:17 UTC (rev 128183)
+++ ZODB/trunk/buildout.cfg	2012-11-07 12:14:31 UTC (rev 128184)
@@ -12,6 +12,7 @@
 recipe = zc.recipe.testrunner
 eggs =
     persistent
+    BTrees
     ZODB [test]
 initialization =
   import os, tempfile
@@ -24,5 +25,6 @@
 recipe = zc.recipe.egg
 eggs =
     persistent
+    BTrees
     ZODB3 [test]
 interpreter = py

Modified: ZODB/trunk/setup.py
===================================================================
--- ZODB/trunk/setup.py	2012-11-06 17:58:17 UTC (rev 128183)
+++ ZODB/trunk/setup.py	2012-11-07 12:14:31 UTC (rev 128184)
@@ -50,67 +50,6 @@
 Framework :: ZODB
 """
 
-# Include directories for C extensions
-# Sniff the location of the headers in 'persistent'.
-
-class ModuleHeaderDir(object):
-
-    def __init__(self, require_spec, where='..'):
-        # By default, assume top-level pkg has the same name as the dist.
-        # Also assume that headers are located in the package dir, and
-        # are meant to be included as follows:
-        #    #include "module/header_name.h"
-        self._require_spec = require_spec
-        self._where = where
-
-    def __str__(self):
-        from pkg_resources import require
-        from pkg_resources import resource_filename
-        require(self._require_spec)
-        return os.path.abspath(
-                    resource_filename(self._require_spec, self._where))
-
-include = [ModuleHeaderDir('persistent'), 'src']
-
-# Set up dependencies for the BTrees package
-base_btrees_depends = [
-    "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", 'L': 'int'}
-
-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": include}
-    if flavor != "fs":
-        kwargs["depends"] = (base_btrees_depends + [KEY_H % _flavors[key],
-                                                    VALUE_H % _flavors[value]])
-    else:
-        kwargs["depends"] = base_btrees_depends
-    if key != "O":
-        kwargs["define_macros"] = [('EXCLUDE_INTSET_SUPPORT', None)]
-    return Extension(name, sources, **kwargs)
-
-exts = [BTreeExtension(flavor)
-        for flavor in ("OO", "IO", "OI", "II", "IF",
-                       "fs", "LO", "OL", "LL", "LF",
-                       )]
-
 def _modname(path, base, name=''):
     if path == base:
         return name
@@ -170,7 +109,6 @@
       maintainer_email="zodb-dev at zope.org",
       packages = find_packages('src'),
       package_dir = {'': 'src'},
-      ext_modules = exts,
       license = "ZPL 2.1",
       platforms = ["any"],
       description = doclines[0],
@@ -186,6 +124,7 @@
       install_requires = [
         'transaction',
         'persistent',
+        'BTrees',
         'zc.lockfile',
         'ZConfig',
         'zdaemon',



More information about the Zodb-checkins mailing list