[Zodb-checkins] SVN: ZODB/trunk/ Merge tseaver-persistent_as_egg branch.
Tres Seaver
cvs-admin at zope.org
Tue Aug 21 16:50:07 UTC 2012
Log message for revision 127543:
Merge tseaver-persistent_as_egg branch.
Changed:
_U ZODB/trunk/
U ZODB/trunk/buildout.cfg
U ZODB/trunk/setup.py
D ZODB/trunk/src/persistent/
-=-
Property changes on: ZODB/trunk
___________________________________________________________________
Added: svn:mergeinfo
+ /ZODB/branches/tseaver-persistent_as_egg:127229-127234,127294,127487,127510
Added: svk:merge
+ 62d5b8a3-27da-0310-9561-8e5933582275:/ZODB/branches/tseaver-persistent_as_egg:127510
Modified: ZODB/trunk/buildout.cfg
===================================================================
--- ZODB/trunk/buildout.cfg 2012-08-21 14:54:11 UTC (rev 127542)
+++ ZODB/trunk/buildout.cfg 2012-08-21 16:50:03 UTC (rev 127543)
@@ -1,15 +1,19 @@
[buildout]
develop = .
-parts = test scripts
-
+parts =
+ test
+ scripts
versions = versions
[versions]
zc.recipe.testrunner = 1.3.0
+persistent = 4.0.0
[test]
recipe = zc.recipe.testrunner
-eggs = ZODB3 [test]
+eggs =
+ persistent
+ ZODB3 [test]
initialization =
import os, tempfile
try: os.mkdir('tmp')
@@ -19,5 +23,7 @@
[scripts]
recipe = zc.recipe.egg
-eggs = ZODB3 [test]
+eggs =
+ persistent
+ ZODB3 [test]
interpreter = py
Modified: ZODB/trunk/setup.py
===================================================================
--- ZODB/trunk/setup.py 2012-08-21 14:54:11 UTC (rev 127542)
+++ ZODB/trunk/setup.py 2012-08-21 16:50:03 UTC (rev 127543)
@@ -35,6 +35,7 @@
sys.exit(0)
+
if sys.version_info < (2, 6):
transaction_version = 'transaction == 1.1.1'
manuel_version = 'manuel < 1.6dev'
@@ -59,8 +60,27 @@
"""
# Include directories for C extensions
-include = ['src']
+# 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",
@@ -72,7 +92,6 @@
"src/BTrees/SetTemplate.c",
"src/BTrees/TreeSetTemplate.c",
"src/BTrees/sorters.c",
- "src/persistent/cPersistence.h",
]
_flavors = {"O": "object", "I": "int", "F": "float", 'L': 'int'}
@@ -80,6 +99,7 @@
KEY_H = "src/BTrees/%skeymacros.h"
VALUE_H = "src/BTrees/%svaluemacros.h"
+
def BTreeExtension(flavor):
key = flavor[0]
value = flavor[1]
@@ -100,35 +120,6 @@
"fs", "LO", "OL", "LL", "LF",
)]
-cPersistence = Extension(name = 'persistent.cPersistence',
- include_dirs = include,
- sources= ['src/persistent/cPersistence.c',
- 'src/persistent/ring.c'],
- depends = ['src/persistent/cPersistence.h',
- 'src/persistent/ring.h',
- 'src/persistent/ring.c']
- )
-
-cPickleCache = Extension(name = 'persistent.cPickleCache',
- include_dirs = include,
- sources= ['src/persistent/cPickleCache.c',
- 'src/persistent/ring.c'],
- depends = ['src/persistent/cPersistence.h',
- 'src/persistent/ring.h',
- 'src/persistent/ring.c']
- )
-
-TimeStamp = Extension(name = 'persistent.TimeStamp',
- include_dirs = include,
- sources= ['src/persistent/TimeStamp.c']
- )
-
-
-exts += [cPersistence,
- cPickleCache,
- TimeStamp,
- ]
-
def _modname(path, base, name=''):
if path == base:
return name
@@ -184,14 +175,12 @@
setup(name="ZODB3",
version=VERSION,
+ setup_requires=['persistent'],
maintainer="Zope Foundation and Contributors",
maintainer_email="zodb-dev at zope.org",
packages = find_packages('src'),
package_dir = {'': 'src'},
ext_modules = exts,
- headers = ['src/persistent/cPersistence.h',
- 'src/persistent/py24compat.h',
- 'src/persistent/ring.h'],
license = "ZPL 2.1",
platforms = ["any"],
description = doclines[0],
@@ -200,8 +189,13 @@
test_suite="__main__.alltests", # to support "setup.py test"
tests_require = ['zope.testing', manuel_version],
extras_require = dict(test=['zope.testing', manuel_version]),
+ # XXX: We don't really want to install these headers; we would
+ # prefer just including them so that folks can build from an sdist.
+ headers = ['include/persistent/cPersistence.h',
+ 'include/persistent/ring.h'],
install_requires = [
transaction_version,
+ 'persistent',
'zc.lockfile',
'ZConfig',
'zdaemon',
More information about the Zodb-checkins
mailing list