[Checkins] SVN: BTrees/trunk/ Package separately.

Tres Seaver cvs-admin at zope.org
Wed Oct 17 23:41:29 UTC 2012


Log message for revision 128048:
  Package separately.

Changed:
  _U  BTrees/trunk/
  A   BTrees/trunk/CHANGES.txt
  A   BTrees/trunk/COPYRIGHT.txt
  A   BTrees/trunk/LICENSE.txt
  A   BTrees/trunk/README.txt
  A   BTrees/trunk/setup.cfg
  A   BTrees/trunk/setup.py
  A   BTrees/trunk/tox.ini

-=-
Added: BTrees/trunk/CHANGES.txt
===================================================================
--- BTrees/trunk/CHANGES.txt	                        (rev 0)
+++ BTrees/trunk/CHANGES.txt	2012-10-17 23:41:25 UTC (rev 128048)
@@ -0,0 +1,13 @@
+``BTrees`` Changelog
+====================
+
+
+4.0.0 (unreleased)
+------------------
+
+Platform Changes
+################
+
+- Dropped support for Python < 2.6.
+
+- Factored ``BTrees`` as a separate distribution.

Added: BTrees/trunk/COPYRIGHT.txt
===================================================================
--- BTrees/trunk/COPYRIGHT.txt	                        (rev 0)
+++ BTrees/trunk/COPYRIGHT.txt	2012-10-17 23:41:25 UTC (rev 128048)
@@ -0,0 +1 @@
+Zope Foundation and Contributors
\ No newline at end of file

Added: BTrees/trunk/LICENSE.txt
===================================================================
--- BTrees/trunk/LICENSE.txt	                        (rev 0)
+++ BTrees/trunk/LICENSE.txt	2012-10-17 23:41:25 UTC (rev 128048)
@@ -0,0 +1,44 @@
+Zope Public License (ZPL) Version 2.1
+
+A copyright notice accompanies this license document that identifies the
+copyright holders.
+
+This license has been certified as open source. It has also been designated as
+GPL compatible by the Free Software Foundation (FSF).
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions in source code must retain the accompanying copyright
+notice, this list of conditions, and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the accompanying copyright
+notice, this list of conditions, and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+
+3. Names of the copyright holders must not be used to endorse or promote
+products derived from this software without prior written permission from the
+copyright holders.
+
+4. The right to distribute this software or to use it for any purpose does not
+give you the right to use Servicemarks (sm) or Trademarks (tm) of the
+copyright
+holders. Use of them is covered by separate agreement with the copyright
+holders.
+
+5. If any files are modified, you must cause the modified files to carry
+prominent notices stating that you changed the files and the date of any
+change.
+
+Disclaimer
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Added: BTrees/trunk/README.txt
===================================================================
--- BTrees/trunk/README.txt	                        (rev 0)
+++ BTrees/trunk/README.txt	2012-10-17 23:41:25 UTC (rev 128048)
@@ -0,0 +1,10 @@
+``BTrees``:  scalable persistent components
+===========================================
+
+This package contains a set of persistent object containers built around
+a modified BTree data structure.  The trees are optimized for use inside
+ZODB's "optimistic concurrency" paradigm, and include explicit resolution
+of conflicts detected by that mechannism.
+
+Please see the Sphinx documentation (``docs/index.rst``) for further
+information.

Added: BTrees/trunk/setup.cfg
===================================================================
--- BTrees/trunk/setup.cfg	                        (rev 0)
+++ BTrees/trunk/setup.cfg	2012-10-17 23:41:25 UTC (rev 128048)
@@ -0,0 +1,10 @@
+[nosetests]
+nocapture=1
+cover-package=BTrees
+cover-erase=1
+with-doctest=0
+where=BTrees
+
+[aliases]
+dev = develop easy_install BTrees[testing]
+docs = develop easy_install BTrees[docs]

Added: BTrees/trunk/setup.py
===================================================================
--- BTrees/trunk/setup.py	                        (rev 0)
+++ BTrees/trunk/setup.py	2012-10-17 23:41:25 UTC (rev 128048)
@@ -0,0 +1,147 @@
+##############################################################################
+#
+# Copyright (c) 2012 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+
+__version__ = '4.0dev'
+
+import os
+import platform
+import sys
+
+
+from setuptools import Extension
+from setuptools import find_packages
+from setuptools import setup
+
+here = os.path.abspath(os.path.dirname(__file__))
+README = (open(os.path.join(here, 'README.txt')).read()
+          + '\n\n' +
+          open(os.path.join(here, 'CHANGES.txt')).read())
+
+# 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')]
+
+# Set up dependencies for the BTrees package
+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",
+    ]
+
+FLAVORS = {"O": "object", "I": "int", "F": "float", 'L': 'int'}
+#XXX should 'fs' be in ZODB instead?
+FAMILIES = ("OO", "IO", "OI", "II", "IF", "fs", "LO", "OL", "LL", "LF")
+
+KEY_H = "BTrees/%skeymacros.h"
+VALUE_H = "BTrees/%svaluemacros.h"
+
+
+def BTreeExtension(family):
+    key = family[0]
+    value = family[1]
+    name = "BTrees._%sBTree" % family
+    sources = ["BTrees/_%sBTree.c" % family]
+    kwargs = {"include_dirs": include}
+    if family != "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)
+
+py_impl = getattr(platform, 'python_implementation', lambda: None)
+is_pypy = py_impl() == 'PyPy'
+is_jython = 'java' in sys.platform
+
+# Jython cannot build the C optimizations, while on PyPy they are
+# anti-optimizations (the C extension compatibility layer is known-slow,
+# and defeats JIT opportunities).
+if is_pypy or is_jython or sys.version_info[0] > 2:
+    ext_modules = []
+else:
+
+    ext_modules = [BTreeExtension(family) for family in FAMILIES]
+
+setup(name='BTrees',
+      version=__version__,
+      description='Scalable persistent object containers',
+      long_description=README,
+      setup_requires=['persistent'],
+      classifiers=[
+        "Development Status :: 6 - Mature",
+        "License :: OSI Approved :: Zope Public License",
+        "Programming Language :: Python",
+        'Programming Language :: Python :: 2',
+        'Programming Language :: Python :: 2.6',
+        'Programming Language :: Python :: 2.7',
+        #'Programming Language :: Python :: 3',
+        #'Programming Language :: Python :: 3.2',
+        "Programming Language :: Python :: Implementation :: CPython",
+        #"Programming Language :: Python :: Implementation :: PyPy",
+        "Topic :: Database",
+        "Topic :: Software Development :: Libraries :: Python Modules",
+        "Operating System :: Microsoft :: Windows",
+        "Operating System :: Unix",
+        ],
+      author="Zope Foundation",
+      author_email="zodb-dev at zope.org",
+      url="http://packages.python.org/BTrees",
+      license="ZPL 2.1",
+      platforms=["any"],
+      packages=find_packages(),
+      include_package_data=True,
+      zip_safe=False,
+      ext_modules = ext_modules,
+      extras_require = {
+        'test': ['transaction'],
+        'testing': ['nose', 'coverage'],
+        'docs': ['Sphinx', 'repoze.sphinx.autointerface'],
+      },
+      test_suite="BTrees.tests",
+      tests_require=[
+        'transaction',
+      ],
+      install_requires=[
+        'zope.interface',
+        'persistent',
+      ],
+      entry_points = """\
+      """
+     )

Added: BTrees/trunk/tox.ini
===================================================================
--- BTrees/trunk/tox.ini	                        (rev 0)
+++ BTrees/trunk/tox.ini	2012-10-17 23:41:25 UTC (rev 128048)
@@ -0,0 +1,41 @@
+[tox]
+envlist = 
+# Jython support pending 2.7 support, due 2012-07-15 or so.  See:
+# http://fwierzbicki.blogspot.com/2012/03/adconion-to-fund-jython-27.html
+#   py26,py27,py32,jython,pypy,coverage,docs
+    py26,py27,coverage,docs
+
+[testenv]
+deps =
+    zope.interface
+    persistent
+commands = 
+    python setup.py test -q
+
+#[testenv:jython]
+#commands = 
+#   jython setup.py test -q
+
+[testenv:coverage]
+basepython =
+    python2.6
+commands = 
+    nosetests --with-xunit --with-xcoverage
+deps =
+    zope.interface
+    persistent
+    nose
+    coverage
+    nosexcover
+
+[testenv:docs]
+basepython =
+    python2.6
+commands = 
+    sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html
+    sphinx-build -b doctest -d docs/_build/doctrees docs docs/_build/doctest
+deps =
+    zope.interface
+    persistent
+    Sphinx
+    repoze.sphinx.autointerface



More information about the checkins mailing list