[Checkins] SVN: ZODB3/trunk/ Make ZODB3 meta-distribution

jim cvs-admin at zope.org
Mon Oct 15 11:40:42 UTC 2012


Log message for revision 128015:
  Make ZODB3 meta-distribution

Changed:
  D   ZODB3/trunk/3.11.txt
  U   ZODB3/trunk/CHANGES.txt
  U   ZODB3/trunk/README.txt
  U   ZODB3/trunk/buildout.cfg
  D   ZODB3/trunk/doc/
  D   ZODB3/trunk/release.py
  U   ZODB3/trunk/setup.py
  D   ZODB3/trunk/src/

-=-
Deleted: ZODB3/trunk/3.11.txt
===================================================================
--- ZODB3/trunk/3.11.txt	2012-10-15 11:23:44 UTC (rev 128014)
+++ ZODB3/trunk/3.11.txt	2012-10-15 11:40:38 UTC (rev 128015)
@@ -1,59 +0,0 @@
-Wish list for 3.11.
-
-These aren't promises, but things I'd like to do:
-
-- ZEO support for loading blobs via HTTP.
-
-- ZEO cache fix for loadBefore.
-
-- invalidation events.
-
-- Make DBs context manager, so in a simple script, one could do:
-
-  with ZEO.DB(someaddr) as connection:
-      do some things in a transaction. Commit and close at the end.
-
-- Persistent sets.
-
-- PxBTrees, persistent objects as keys in BTrees.
-
-  - Compare on persistent references.
-
-- Python BTrees and persistence.
-
-- JSONic read-only mode where you can read most objects for which you
-  don't have classes as long at they have the default getstate.
-  This might be as simple as using a variation of broken objects.
-
-- persistent.Object, which handles the common case of a simple object
-  that just has some data. (The moral equivalent of a JS object. :)
-
-- API to preload objects.
-
-  Say you know you're going to oterate over an array of objects, you
-  might signal that intend to use the object with something like::
-
-    for oject in objects:
-        object._p_will_use()
-
-  (I think there's an RFC for something like this.)
-
-  For most storages, _p_will_use won't have any effect, but for ZEO,
-  it could cause a load request to be sent to the server if the object
-  isn't already loaded or in the zeo cache. This way, you could have
-  lots of loads in flight at once, mitigating round-trip costs.
-
-- ZEO cache iterator, to facilitate analysis of cache contents.
-
-- Update file-storage iterator to expose file position as non-private
-  var for transactions and database records.
-
-  Expose trans size.
-
-- Update ZEO ClientStorage to block for soem short time rather than
-  error on short disconnection.
-
-- Remove silly ZEO connection backooff by default.
-
-- Rewrite ZEO connection logic using async IO rather than threads.
-

Modified: ZODB3/trunk/CHANGES.txt
===================================================================
--- ZODB3/trunk/CHANGES.txt	2012-10-15 11:23:44 UTC (rev 128014)
+++ ZODB3/trunk/CHANGES.txt	2012-10-15 11:40:38 UTC (rev 128015)
@@ -2,15 +2,21 @@
  Change History
 ================
 
-4.0.0a1 (2012-??-??)
+3.11.0a1 (2012-??-??)
 =====================
 
 New Features
 ------------
 
-- The ``persistent`` package is now released as a separate distribution,
-  on which ZODB now depends.
+- ZODB3 has been split into 3 separate packages:
 
+  - persistent
+  - ZODB
+  - ZEO
+
+  The ZODB3 distribution is simply a meta-distribution, for backward
+  compatibility, that depends on the other 3.
+
 - ZODB no longer depends on zope.event.  It now uses ZODB.event, which
   uses zope.event if it is installed.  You can override
   ZODB.event.notify to provide your own event handling, although

Modified: ZODB3/trunk/README.txt
===================================================================
--- ZODB3/trunk/README.txt	2012-10-15 11:23:44 UTC (rev 128014)
+++ ZODB3/trunk/README.txt	2012-10-15 11:40:38 UTC (rev 128015)
@@ -24,7 +24,7 @@
 Compatibility
 =============
 
-ZODB 3.10 requires Python 2.5 or later.
+ZODB3 3.11 requires Python 2.6 or later.
 
 Note --
    When using ZEO and upgrading from Python 2.4, you need to upgrade

Modified: ZODB3/trunk/buildout.cfg
===================================================================
--- ZODB3/trunk/buildout.cfg	2012-10-15 11:23:44 UTC (rev 128014)
+++ ZODB3/trunk/buildout.cfg	2012-10-15 11:40:38 UTC (rev 128015)
@@ -1,7 +1,6 @@
 [buildout]
 develop = .
 parts =
-    test
     scripts
 versions = versions
 
@@ -11,8 +10,9 @@
 [test]
 recipe = zc.recipe.testrunner
 eggs =
-    persistent
+    persistent [test]
     ZODB [test]
+    ZEO [test]
 initialization =
   import os, tempfile
   try: os.mkdir('tmp')
@@ -22,7 +22,5 @@
 
 [scripts]
 recipe = zc.recipe.egg
-eggs =
-    persistent
-    ZODB3 [test]
+eggs = ${test:eggs}
 interpreter = py

Deleted: ZODB3/trunk/release.py
===================================================================
--- ZODB3/trunk/release.py	2012-10-15 11:23:44 UTC (rev 128014)
+++ ZODB3/trunk/release.py	2012-10-15 11:40:38 UTC (rev 128015)
@@ -1,81 +0,0 @@
-#! /usr/bin/env python
-"""Update version numbers and release dates for the next release.
-
-usage: release.py version date
-
-version should be a string like "3.2.0c1"
-date should be a string like "23-Sep-2003"
-
-The following files are updated:
-    - setup.py
-    - NEWS.txt
-    - doc/guide/zodb.tex
-    - src/ZEO/__init__.py
-    - src/ZEO/version.txt
-    - src/ZODB/__init__.py
-"""
-
-import fileinput
-import os
-import re
-
-# In file filename, replace the first occurrence of regexp pat with
-# string repl.
-def replace(filename, pat, repl):
-    from sys import stderr as e # fileinput hijacks sys.stdout
-    foundone = False
-    for line in fileinput.input([filename], inplace=True, backup="~"):
-        if foundone:
-            print line,
-        else:
-            match = re.search(pat, line)
-            if match is not None:
-                foundone = True
-
-                new = re.sub(pat, repl, line)
-                print new,
-
-                print >> e, "In %s, replaced:" % filename
-                print >> e, "   ", repr(line)
-                print >> e, "   ", repr(new)
-
-            else:
-                print line,
-
-    if not foundone:
-        print >> e, "*" * 60, "Oops!"
-        print >> e, "    Failed to find %r in %r" % (pat, filename)
-
-# Nothing in our codebase cares about ZEO/version.txt.  Jeremy said
-# someone asked for it so that a shell script could read up the ZEO
-# version easily.
-# Before ZODB 3.4, the ZEO version was one smaller than the ZODB version;
-# e.g., ZEO 2.2.7 shipped with ZODB 3.2.7.  Now ZEO and ZODB share their
-# version number.
-def write_zeoversion(path, version):
-    f = open(path, "w")
-    print >> f, version
-    f.close()
-
-def main(args):
-    version, date = args
-
-    replace("setup.py",
-            r'^VERSION = "\S+"$',
-            'VERSION = "%s"' % version)
-    replace("src/ZODB/__init__.py",
-            r'__version__ = "\S+"',
-            '__version__ = "%s"' % version)
-    replace("src/ZEO/__init__.py",
-            r'version = "\S+"',
-            'version = "%s"' % version)
-    write_zeoversion("src/ZEO/version.txt", version)
-    replace("NEWS.txt",
-            r"^Release date: .*",
-            "Release date: %s" % date)
-    replace("doc/guide/zodb.tex",
-            r"release{\S+}",
-            "release{%s}" % version)
-if __name__ == "__main__":
-    import sys
-    main(sys.argv[1:])

Modified: ZODB3/trunk/setup.py
===================================================================
--- ZODB3/trunk/setup.py	2012-10-15 11:23:44 UTC (rev 128014)
+++ ZODB3/trunk/setup.py	2012-10-15 11:40:38 UTC (rev 128015)
@@ -20,34 +20,19 @@
 interface, rich transaction support, and undo.
 """
 
-VERSION = "4.0.0dev"
+VERSION = "3.11.0dev"
 
 from ez_setup import use_setuptools
 use_setuptools()
 
-from setuptools import setup, find_packages
-from setuptools.extension import Extension
+from setuptools import setup
 import os
 import sys
 
-if sys.version_info < (2, 5):
-    print "This version of ZODB requires Python 2.5 or higher"
+if sys.version_info < (2, 6):
+    print "This version of ZODB requires Python 2.6 or higher"
     sys.exit(0)
 
-
-
-if sys.version_info < (2, 6):
-    transaction_version = 'transaction == 1.1.1'
-    manuel_version = 'manuel < 1.6dev'
-else:
-    transaction_version = 'transaction >= 1.1.0'
-    manuel_version = 'manuel'
-
-# The (non-obvious!) choices for the Trove Development Status line:
-# Development Status :: 5 - Production/Stable
-# Development Status :: 4 - Beta
-# Development Status :: 3 - Alpha
-
 classifiers = """\
 Intended Audience :: Developers
 License :: OSI Approved :: Zope Public License
@@ -59,73 +44,7 @@
 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
-    dirname, basename = os.path.split(path)
-    return _modname(dirname, base, basename + '.' + name)
-
 def alltests():
     import logging
     import pkg_resources
@@ -171,34 +90,21 @@
     ).decode('latin-1').replace(u'L\xf6wis', '|Lowis|')
     )+ '''\n\n.. |Lowis| unicode:: L \\xf6 wis\n'''
 
+tests_require = ['ZEO [test]', 'ZODB [test]', 'persistent [test]'],
+
 setup(name="ZODB",
       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,
       license = "ZPL 2.1",
       platforms = ["any"],
       description = doclines[0],
       classifiers = filter(None, classifiers.split("\n")),
       long_description = long_description,
       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',
-        'zope.interface',
-        ],
+      tests_require = tests_require,
+      extras_require = dict(test=tests_require),
+      install_requires = ['ZEO', 'ZODB', 'persistent', 'transaction'],
       zip_safe = False,
       entry_points = """
       [console_scripts]
@@ -207,6 +113,9 @@
       fsrefs = ZODB.scripts.fsrefs:main
       fstail = ZODB.scripts.fstail:Main
       repozo = ZODB.scripts.repozo:main
+      zeopack = ZEO.scripts.zeopack:main
+      runzeo = ZEO.runzeo:main
+      zeopasswd = ZEO.zeopasswd:main
+      zeoctl = ZEO.zeoctl:main
       """,
-      include_package_data = True,
       )



More information about the checkins mailing list