[Checkins] SVN: z3c.batching/tags/1.0.0/ egg 1.0.0

Nikolay Kim fafhrd at datacom.kz
Mon Feb 18 05:15:18 EST 2008


Log message for revision 84013:
  egg 1.0.0

Changed:
  A   z3c.batching/tags/1.0.0/
  D   z3c.batching/tags/1.0.0/CHANGES.txt
  A   z3c.batching/tags/1.0.0/CHANGES.txt
  A   z3c.batching/tags/1.0.0/bootstrap.py
  A   z3c.batching/tags/1.0.0/buildout.cfg
  D   z3c.batching/tags/1.0.0/setup.py
  A   z3c.batching/tags/1.0.0/setup.py
  D   z3c.batching/tags/1.0.0/src/z3c/batching/batch.py
  A   z3c.batching/tags/1.0.0/src/z3c/batching/batch.py

-=-
Copied: z3c.batching/tags/1.0.0 (from rev 84010, z3c.batching/trunk)

Deleted: z3c.batching/tags/1.0.0/CHANGES.txt
===================================================================
--- z3c.batching/trunk/CHANGES.txt	2008-02-18 09:08:33 UTC (rev 84010)
+++ z3c.batching/tags/1.0.0/CHANGES.txt	2008-02-18 10:15:17 UTC (rev 84013)
@@ -1,8 +0,0 @@
-=======
-CHANGES
-=======
-
-1.0.0 (2007-10-30)
-------------------
-
-- Initial release.

Copied: z3c.batching/tags/1.0.0/CHANGES.txt (from rev 84012, z3c.batching/trunk/CHANGES.txt)
===================================================================
--- z3c.batching/tags/1.0.0/CHANGES.txt	                        (rev 0)
+++ z3c.batching/tags/1.0.0/CHANGES.txt	2008-02-18 10:15:17 UTC (rev 84013)
@@ -0,0 +1,8 @@
+=======
+CHANGES
+=======
+
+1.0.0 (2008-02-18)
+------------------
+
+- Initial release.

Copied: z3c.batching/tags/1.0.0/bootstrap.py (from rev 84012, z3c.batching/trunk/bootstrap.py)
===================================================================
--- z3c.batching/tags/1.0.0/bootstrap.py	                        (rev 0)
+++ z3c.batching/tags/1.0.0/bootstrap.py	2008-02-18 10:15:17 UTC (rev 84013)
@@ -0,0 +1,52 @@
+##############################################################################
+#
+# Copyright (c) 2006 Zope Corporation 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.
+#
+##############################################################################
+"""Bootstrap a buildout-based project
+
+Simply run this script in a directory containing a buildout.cfg.
+The script accepts buildout command-line options, so you can
+use the -c option to specify an alternate configuration file.
+
+$Id$
+"""
+
+import os, shutil, sys, tempfile, urllib2
+
+tmpeggs = tempfile.mkdtemp()
+
+ez = {}
+exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
+                     ).read() in ez
+ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
+
+import pkg_resources
+
+cmd = 'from setuptools.command.easy_install import main; main()'
+if sys.platform == 'win32':
+    cmd = '"%s"' % cmd # work around spawn lamosity on windows
+
+ws = pkg_resources.working_set
+assert os.spawnle(
+    os.P_WAIT, sys.executable, sys.executable,
+    '-c', cmd, '-mqNxd', tmpeggs, 'zc.buildout',
+    dict(os.environ,
+         PYTHONPATH=
+         ws.find(pkg_resources.Requirement.parse('setuptools')).location
+         ),
+    ) == 0
+
+ws.add_entry(tmpeggs)
+ws.require('zc.buildout')
+import zc.buildout.buildout
+zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap'])
+shutil.rmtree(tmpeggs)

Copied: z3c.batching/tags/1.0.0/buildout.cfg (from rev 84012, z3c.batching/trunk/buildout.cfg)
===================================================================
--- z3c.batching/tags/1.0.0/buildout.cfg	                        (rev 0)
+++ z3c.batching/tags/1.0.0/buildout.cfg	2008-02-18 10:15:17 UTC (rev 84013)
@@ -0,0 +1,9 @@
+[buildout]
+index = http://download.zope.org/zope3.4
+develop = .
+parts = test
+
+[test]
+recipe = zc.recipe.testrunner
+eggs = z3c.batching
+defaults = ['--tests-pattern', '^f?tests$', '-v']

Deleted: z3c.batching/tags/1.0.0/setup.py
===================================================================
--- z3c.batching/trunk/setup.py	2008-02-18 09:08:33 UTC (rev 84010)
+++ z3c.batching/tags/1.0.0/setup.py	2008-02-18 10:15:17 UTC (rev 84013)
@@ -1,62 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 Zope Corporation 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.
-#
-##############################################################################
-"""Setup for z3c.batching package
-
-$Id$
-"""
-import os
-from setuptools import setup, find_packages
-
-def read(*rnames):
-    return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
-
-setup(name='z3c.batching',
-      version = '1.0.0',
-      author='Zope Corporation and Contributors',
-      author_email='zope3-dev at zope.org',
-      description='Batching',
-      long_description=(
-          read('README.txt')
-          + '\n\n' +
-          'Detailed Dcoumentation\n' +
-          '======================\n'
-          + '\n\n' +
-          read('src', 'z3c', 'batching', 'README.txt')
-          + '\n\n' +
-          read('CHANGES.txt')
-          ),
-      keywords = "zope3 batching",
-      classifiers = [
-          'Development Status :: 5 - Production/Stable',
-          'Environment :: Web Environment',
-          'Intended Audience :: Developers',
-          'License :: OSI Approved :: Zope Public License',
-          'Programming Language :: Python',
-          'Natural Language :: English',
-          'Operating System :: OS Independent',
-          'Topic :: Internet :: WWW/HTTP',
-          'Framework :: Zope3'],
-      url='http://cheeseshop.python.org/pypi/z3c.batching',
-      license='ZPL 2.1',
-      packages=find_packages('src'),
-      package_dir = {'': 'src'},
-      namespace_packages=['z3c'],
-      install_requires = ['setuptools',
-                          'zope.component',
-                          'zope.interface',
-                          'zope.schema',
-                          ],
-      include_package_data = True,
-      zip_safe = False,
-      )

Copied: z3c.batching/tags/1.0.0/setup.py (from rev 84012, z3c.batching/trunk/setup.py)
===================================================================
--- z3c.batching/tags/1.0.0/setup.py	                        (rev 0)
+++ z3c.batching/tags/1.0.0/setup.py	2008-02-18 10:15:17 UTC (rev 84013)
@@ -0,0 +1,61 @@
+##############################################################################
+#
+# Copyright (c) 2007 Zope Corporation 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.
+#
+##############################################################################
+"""Setup for z3c.batching package
+
+$Id$
+"""
+import os
+from setuptools import setup, find_packages
+
+def read(*rnames):
+    return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
+
+setup(name='z3c.batching',
+      version = '1.0.0',
+      author='Zope Corporation and Contributors',
+      author_email='zope3-dev at zope.org',
+      description='Batching',
+      long_description=(
+          read('README.txt')
+          + '\n\n' +
+          'Detailed Dcoumentation\n' +
+          '======================\n'
+          + '\n\n' +
+          read('src', 'z3c', 'batching', 'README.txt')
+          + '\n\n' +
+          read('CHANGES.txt')
+          ),
+      keywords = "zope3 batching",
+      classifiers = [
+          'Development Status :: 5 - Production/Stable',
+          'Environment :: Web Environment',
+          'Intended Audience :: Developers',
+          'License :: OSI Approved :: Zope Public License',
+          'Programming Language :: Python',
+          'Natural Language :: English',
+          'Operating System :: OS Independent',
+          'Topic :: Internet :: WWW/HTTP',
+          'Framework :: Zope3'],
+      url='http://cheeseshop.python.org/pypi/z3c.batching',
+      license='ZPL 2.1',
+      packages=find_packages('src'),
+      package_dir = {'': 'src'},
+      namespace_packages=['z3c'],
+      install_requires = ['setuptools',
+                          'zope.interface',
+                          'zope.schema',
+                          ],
+      include_package_data = True,
+      zip_safe = False,
+      )

Deleted: z3c.batching/tags/1.0.0/src/z3c/batching/batch.py
===================================================================
--- z3c.batching/trunk/src/z3c/batching/batch.py	2008-02-18 09:08:33 UTC (rev 84010)
+++ z3c.batching/tags/1.0.0/src/z3c/batching/batch.py	2008-02-18 10:15:17 UTC (rev 84013)
@@ -1,176 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2003-2007 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (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.
-#
-##############################################################################
-"""Batching Implementation
-
-$Id$
-"""
-__docformat__ = 'restructuredtext'
-
-import zope.interface
-from zope.schema.fieldproperty import FieldProperty
-from zope.interface.common.sequence import IFiniteSequence
-
-from z3c.batching import interfaces
-
-
-class Batch(object):
-    zope.interface.implements(interfaces.IBatch)
-
-    start = FieldProperty(interfaces.IBatch['start'])
-    size = FieldProperty(interfaces.IBatch['size'])
-    end = FieldProperty(interfaces.IBatch['end'])
-
-    def __init__(self, sequence, start=0, size=20, batches=None):
-        self.sequence = sequence
-
-        length = len(sequence)
-        self._length = length
-
-        # See interfaces.IBatch
-        self.start = start
-        if length == 0:
-            self.start = -1
-        elif start >= length:
-            raise IndexError('start index key out of range')
-
-        # See interfaces.IBatch
-        self.size = size
-        self._trueSize = size
-
-        if start + size >= length:
-            self._trueSize = length - start
-
-        # See interfaces.IBatch
-        if length == 0:
-            self.end = -1
-        else:
-            self.end = start + self._trueSize - 1
-
-        if batches is None:
-            batches = Batches(self)
-
-        self.batches = batches
-
-    @property
-    def index(self):
-        return self.start / self.size
-
-    @property
-    def number(self):
-        """See interfaces.IBatch"""
-        return self.start / self.size + 1
-
-    @property
-    def total(self):
-        """See interfaces.IBatch"""
-        total = self._length / self.size
-        if self._length % self.size:
-            total += 1
-        return total
-
-    @property
-    def next(self):
-        try:
-            return self.batches[self.index + 1]
-        except IndexError:
-            return None
-
-    @property
-    def previous(self):
-        idx = self.index - 1
-        if idx >= 0:
-            return self.batches[idx]
-        return None
-
-    @property
-    def firstElement(self):
-        """See interfaces.IBatch"""
-        return self.sequence[self.start]
-
-    @property
-    def lastElement(self):
-        """See interfaces.IBatch"""
-        return self.sequence[self.end]
-
-    def __getitem__(self, key):
-        """See zope.interface.common.sequence.IMinimalSequence"""
-        if key >= self._trueSize:
-            raise IndexError('batch index out of range')
-        return self.sequence[self.start+key]
-
-    def __iter__(self):
-        """See zope.interface.common.sequence.IMinimalSequence"""
-        return iter(self.sequence[self.start: self.end+1])
-
-    def __len__(self):
-        """See zope.interface.common.sequence.IFiniteSequence"""
-        return self._trueSize
-
-    def __contains__(self, item):
-        for i in self:
-            if item == i:
-                return True
-        else:
-            return False
-
-    def __getslice__(self, i, j):
-        if j > self.end:
-            j = self._trueSize
-
-        return [self[idx] for idx in range(i, j)]
-
-    def __eq__(self, other):
-        return ((self.size, self.start, self.sequence) ==
-                (other.size, other.start, other.sequence))
-
-    def __ne__(self, other):
-        return not self.__eq__(other)
-
-    def __repr__(self):
-        return '<%s start=%i, size=%i>' % (
-            self.__class__.__name__, self.start, self.size)
-
-
-class Batches(object):
-    zope.interface.implements(IFiniteSequence)
-    
-    def __init__(self, batch):
-        self.size = batch.size
-        self.total = batch.total
-        self.sequence = batch.sequence
-        
-        self._batches = {batch.index: batch}
-
-    def __len__(self):
-        return self.total
-
-    def __getitem__(self, key):
-        if key not in self._batches:
-            if key < 0:
-                key = self.total + key
-
-            batch = Batch(
-                self.sequence, key*self.size, self.size, self)
-            self._batches[batch.index] = batch
-
-        try:
-            return self._batches[key]
-        except KeyError:
-            raise IndexError(key)
-
-    def __getslice__(self, i, j):
-        if j > self.total:
-            j = self.total-1
-
-        return [self[idx] for idx in range(i, j)]

Copied: z3c.batching/tags/1.0.0/src/z3c/batching/batch.py (from rev 84011, z3c.batching/trunk/src/z3c/batching/batch.py)
===================================================================
--- z3c.batching/tags/1.0.0/src/z3c/batching/batch.py	                        (rev 0)
+++ z3c.batching/tags/1.0.0/src/z3c/batching/batch.py	2008-02-18 10:15:17 UTC (rev 84013)
@@ -0,0 +1,179 @@
+##############################################################################
+#
+# Copyright (c) 2003-2007 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (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.
+#
+##############################################################################
+"""Batching Implementation
+
+$Id$
+"""
+__docformat__ = 'restructuredtext'
+
+import zope.interface
+from zope.schema.fieldproperty import FieldProperty
+from zope.interface.common.sequence import IFiniteSequence
+
+from z3c.batching import interfaces
+
+
+class Batch(object):
+    zope.interface.implements(interfaces.IBatch)
+
+    start = FieldProperty(interfaces.IBatch['start'])
+    size = FieldProperty(interfaces.IBatch['size'])
+    end = FieldProperty(interfaces.IBatch['end'])
+
+    def __init__(self, sequence, start=0, size=20, batches=None):
+        self.sequence = sequence
+
+        length = len(sequence)
+        self._length = length
+
+        # See interfaces.IBatch
+        self.start = start
+        if length == 0:
+            self.start = -1
+        elif start >= length:
+            raise IndexError('start index key out of range')
+
+        # See interfaces.IBatch
+        self.size = size
+        self._trueSize = size
+
+        if start + size >= length:
+            self._trueSize = length - start
+
+        # See interfaces.IBatch
+        if length == 0:
+            self.end = -1
+        else:
+            self.end = start + self._trueSize - 1
+
+        if batches is None:
+            batches = Batches(self)
+
+        self.batches = batches
+
+    @property
+    def index(self):
+        return self.start / self.size
+
+    @property
+    def number(self):
+        """See interfaces.IBatch"""
+        return self.start / self.size + 1
+
+    @property
+    def total(self):
+        """See interfaces.IBatch"""
+        total = self._length / self.size
+        if self._length % self.size:
+            total += 1
+        return total
+
+    @property
+    def next(self):
+        try:
+            return self.batches[self.index + 1]
+        except IndexError:
+            return None
+
+    @property
+    def previous(self):
+        idx = self.index - 1
+        if idx >= 0:
+            return self.batches[idx]
+        return None
+
+    @property
+    def firstElement(self):
+        """See interfaces.IBatch"""
+        return self.sequence[self.start]
+
+    @property
+    def lastElement(self):
+        """See interfaces.IBatch"""
+        return self.sequence[self.end]
+
+    def __getitem__(self, key):
+        """See zope.interface.common.sequence.IMinimalSequence"""
+        if key >= self._trueSize:
+            raise IndexError('batch index out of range')
+        return self.sequence[self.start+key]
+
+    def __iter__(self):
+        """See zope.interface.common.sequence.IMinimalSequence"""
+        return iter(self.sequence[self.start: self.end+1])
+
+    def __len__(self):
+        """See zope.interface.common.sequence.IFiniteSequence"""
+        return self._trueSize
+
+    def __contains__(self, item):
+        for i in self:
+            if item == i:
+                return True
+        else:
+            return False
+
+    def __getslice__(self, i, j):
+        if j > self.end:
+            j = self._trueSize
+
+        return [self[idx] for idx in range(i, j)]
+
+    def __eq__(self, other):
+        return ((self.size, self.start, self.sequence) ==
+                (other.size, other.start, other.sequence))
+
+    def __ne__(self, other):
+        return not self.__eq__(other)
+
+    def __nonzero__(self):
+        return self._trueSize != 0
+
+    def __repr__(self):
+        return '<%s start=%i, size=%i>' % (
+            self.__class__.__name__, self.start, self.size)
+
+
+class Batches(object):
+    zope.interface.implements(IFiniteSequence)
+    
+    def __init__(self, batch):
+        self.size = batch.size
+        self.total = batch.total
+        self.sequence = batch.sequence
+        
+        self._batches = {batch.index: batch}
+
+    def __len__(self):
+        return self.total
+
+    def __getitem__(self, key):
+        if key not in self._batches:
+            if key < 0:
+                key = self.total + key
+
+            batch = Batch(
+                self.sequence, key*self.size, self.size, self)
+            self._batches[batch.index] = batch
+
+        try:
+            return self._batches[key]
+        except KeyError:
+            raise IndexError(key)
+
+    def __getslice__(self, i, j):
+        if j > self.total:
+            j = self.total-1
+
+        return [self[idx] for idx in range(i, j)]



More information about the Checkins mailing list