[Zope-Checkins] SVN: Zope/branches/2.9-with-ZODB3.8/setup.py -
fixed ZODB setup.py integration
Christian Theune
ct at gocept.com
Fri Mar 9 11:08:21 EST 2007
Log message for revision 73123:
- fixed ZODB setup.py integration
Changed:
U Zope/branches/2.9-with-ZODB3.8/setup.py
-=-
Modified: Zope/branches/2.9-with-ZODB3.8/setup.py
===================================================================
--- Zope/branches/2.9-with-ZODB3.8/setup.py 2007-03-09 15:56:06 UTC (rev 73122)
+++ Zope/branches/2.9-with-ZODB3.8/setup.py 2007-03-09 16:08:21 UTC (rev 73123)
@@ -307,30 +307,6 @@
'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,
@@ -387,35 +363,13 @@
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']
- ),
+ # Mixed ExtensionClass/Persistence module
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",
@@ -457,6 +411,82 @@
]
+# ZODB extension Modules
+
+include = ['.']
+
+base_btrees_depends = [
+ "BTrees/BTreeItemsTemplate.c",
+ "BTrees/BTreeModuleTemplate.c",
+ "BTrees/BTreeTemplate.c",
+ "BTrees/BucketTemplate.c",
+ "BTrees/MergeTemplate.c",
+ "BTrees/SetOpTemplate.c",
+ "BTrees/SetTemplate.c",
+ "BTrees/TreeSetTemplate.c",
+ "BTrees/sorters.c",
+ "persistent/cPersistence.h",
+ ]
+
+_flavors = {"O": "object", "I": "int", "F": "float", 'L': 'int'}
+
+KEY_H = "BTrees/%skeymacros.h"
+VALUE_H = "BTrees/%svaluemacros.h"
+
+def BTreeExtension(flavor):
+ key = flavor[0]
+ value = flavor[1]
+ name = "BTrees._%sBTree" % flavor
+ sources = ["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)
+
+ext_modules += [BTreeExtension(flavor)
+ for flavor in ("OO", "IO", "OI", "II", "IF",
+ "fs", "LO", "OL", "LL", "LF",
+ )]
+
+cPersistence = Extension(name = 'persistent.cPersistence',
+ include_dirs = include,
+ sources= ['persistent/cPersistence.c',
+ 'persistent/ring.c'],
+ depends = ['persistent/cPersistence.h',
+ 'persistent/ring.h',
+ 'persistent/ring.c']
+ )
+
+cPickleCache = Extension(name = 'persistent.cPickleCache',
+ include_dirs = include,
+ sources= ['persistent/cPickleCache.c',
+ 'persistent/ring.c'],
+ depends = ['persistent/cPersistence.h',
+ 'persistent/ring.h',
+ 'persistent/ring.c']
+ )
+
+TimeStamp = Extension(name = 'persistent.TimeStamp',
+ include_dirs = include,
+ sources= ['persistent/TimeStamp.c']
+ )
+
+winlock = Extension(name = 'ZODB.winlock',
+ include_dirs = include,
+ sources = ['ZODB/winlock.c']
+ )
+
+ext_modules += [cPersistence,
+ cPickleCache,
+ TimeStamp,
+ winlock,
+ ]
+
# We're using the module docstring as the distutils descriptions.
doclines = __doc__.split("\n")
More information about the Zope-Checkins
mailing list