[Checkins] SVN: lovely.mount/trunk/ Did the basic fixups. However, more fixing needs to be done to

Stephan Richter srichter at gmail.com
Sun Jul 26 21:21:36 EDT 2009


Log message for revision 102311:
  Did the basic fixups. However, more fixing needs to be done to 
  make the tests pass. I leave this for someone else to do.
  

Changed:
  A   lovely.mount/trunk/CHANGES.txt
  A   lovely.mount/trunk/bootstrap.py
  U   lovely.mount/trunk/buildout.cfg
  D   lovely.mount/trunk/setup.cfg
  U   lovely.mount/trunk/setup.py
  U   lovely.mount/trunk/src/lovely/mount/container.py
  U   lovely.mount/trunk/src/lovely/mount/container.txt
  U   lovely.mount/trunk/src/lovely/mount/interfaces.py
  U   lovely.mount/trunk/src/lovely/mount/root.py
  U   lovely.mount/trunk/src/lovely/mount/tests.py
  U   lovely.mount/trunk/src/lovely/mount/vocabulary.py

-=-
Added: lovely.mount/trunk/CHANGES.txt
===================================================================
--- lovely.mount/trunk/CHANGES.txt	                        (rev 0)
+++ lovely.mount/trunk/CHANGES.txt	2009-07-27 01:21:35 UTC (rev 102311)
@@ -0,0 +1,8 @@
+=======
+CHANGES
+=======
+
+0.1.0 (2009-07-26)
+------------------
+
+- Initial release.


Property changes on: lovely.mount/trunk/CHANGES.txt
___________________________________________________________________
Added: svn:eol-style
   + native

Added: lovely.mount/trunk/bootstrap.py
===================================================================
--- lovely.mount/trunk/bootstrap.py	                        (rev 0)
+++ lovely.mount/trunk/bootstrap.py	2009-07-27 01:21:35 UTC (rev 102311)
@@ -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)


Property changes on: lovely.mount/trunk/bootstrap.py
___________________________________________________________________
Added: svn:keywords
   + Id

Modified: lovely.mount/trunk/buildout.cfg
===================================================================
--- lovely.mount/trunk/buildout.cfg	2009-07-26 13:33:28 UTC (rev 102310)
+++ lovely.mount/trunk/buildout.cfg	2009-07-27 01:21:35 UTC (rev 102311)
@@ -1,7 +1,6 @@
 [buildout]
 develop = .
 parts = test
-find-links = http://download.zope.org/distribution/
 
 [test]
 recipe = zc.recipe.testrunner

Deleted: lovely.mount/trunk/setup.cfg
===================================================================
--- lovely.mount/trunk/setup.cfg	2009-07-26 13:33:28 UTC (rev 102310)
+++ lovely.mount/trunk/setup.cfg	2009-07-27 01:21:35 UTC (rev 102311)
@@ -1,3 +0,0 @@
-[egg_info]
-tag_build = .dev
-tag_svn_revision = 1

Modified: lovely.mount/trunk/setup.py
===================================================================
--- lovely.mount/trunk/setup.py	2009-07-26 13:33:28 UTC (rev 102310)
+++ lovely.mount/trunk/setup.py	2009-07-27 01:21:35 UTC (rev 102311)
@@ -1,23 +1,69 @@
-#!python
+##############################################################################
+#
+# Copyright (c) 2007 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.
+#
+##############################################################################
+"""
+$Id: setup.py 102278 2009-07-24 19:00:17Z srichter $
+"""
+import os
 from setuptools import setup, find_packages
 
-setup(name='lovely.mount',
-      version='0.1',
-      author="Stephan Richter, Jodok Batlogg",
-      author_email="srichter at cosmos.phy.tufts.edu, jodok.batlogg at lovelysystems.com",
-      description="Database mounts for zope 3",
-      license = "ZPL 2.1",
-      keywords = "zope3 web20 zope database mount",
-      url='svn://svn.zope.org/repos/main/lovely.mount',
+def read(*rnames):
+    return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
 
-      packages=find_packages('src'),
-      include_package_data=True,
-      package_dir = {'':'src'},
-      namespace_packages=['lovely'],
-      install_requires=['setuptools',
-                        'zope.interface',
-                        'zope.component',
-                        ],
-      extras_require={"test": ["zope.app.testing"]},
-      dependency_links=['http://download.zope.org/distribution'],
-      )
+setup (
+    name='lovely.mount',
+    version='0.1.0',
+    author="Stephan Richter, Jodok Batlogg and the Zope Community",
+    author = "Lovely Systems",
+    author_email = "zope-dev at zope.org",
+    description="Database mounts for Zope 3",
+    long_description=(
+        read('src', 'lovely', 'mount', 'README.txt')
+        + '\n\n' +
+        read('src', 'lovely', 'mount', 'container.txt')
+        + '\n\n' +
+        read('CHANGES.txt')
+        ),
+    license = "ZPL 2.1",
+    keywords = "zope3 lovely zodb mount",
+    classifiers = [
+        'Development Status :: 4 - Beta',
+        '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://pypi.python.org/pypi/lovely.mount',
+    packages = find_packages('src'),
+    include_package_data = True,
+    package_dir = {'':'src'},
+    namespace_packages = ['lovely'],
+    extras_require = dict(
+        test = [
+            'zope.app.testing',
+            'zope.site']
+        ),
+    install_requires = [
+        'ZODB3',
+        'setuptools',
+        'zope.app.schema',
+        'zope.component',
+        'zope.componentvocabulary',
+        'zope.container',
+        'zope.interface',
+        ],
+    zip_safe = False,
+)

Modified: lovely.mount/trunk/src/lovely/mount/container.py
===================================================================
--- lovely.mount/trunk/src/lovely/mount/container.py	2009-07-26 13:33:28 UTC (rev 102310)
+++ lovely.mount/trunk/src/lovely/mount/container.py	2009-07-27 01:21:35 UTC (rev 102311)
@@ -1,14 +1,13 @@
-from zope.app.container.contained import Contained, setitem, uncontained
-import root
+from zope.container.contained import Contained, setitem, uncontained
 from zope import interface
-import interfaces
 from zope.schema.fieldproperty import FieldProperty
-from zope.app.container.interfaces import IContained
+from zope.container.interfaces import IContained
+from lovely.mount import interfaces, root
 
 class MountpointContainer(root.DBRoot, Contained):
-    
+
     interface.implements(interfaces.IMountpointContainer)
-    
+
     dbName = FieldProperty(interfaces.IMountpointContainer['dbName'])
 
     def get(self, key, default=None):

Modified: lovely.mount/trunk/src/lovely/mount/container.txt
===================================================================
--- lovely.mount/trunk/src/lovely/mount/container.txt	2009-07-26 13:33:28 UTC (rev 102310)
+++ lovely.mount/trunk/src/lovely/mount/container.txt	2009-07-27 01:21:35 UTC (rev 102311)
@@ -8,17 +8,17 @@
     >>> from lovely.mount import container
     >>> mpc = container.MountpointContainer('2')
     >>> root['mpc'] = mpc
-    
-If a mountpoint is created, the mountpoint has to be commited. Otherwise it's 
+
+If a mountpoint is created, the mountpoint has to be commited. Otherwise it's
 not possible to determine on which connection it should be stored.
 
     >>> import transaction
     >>> transaction.commit()
 
-    >>> from zope.app.folder import Folder
+    >>> from zope.site.folder import Folder
     >>> f = Folder()
     >>> mpc['f'] = f
-    
+
     >>> transaction.commit()
 
 

Modified: lovely.mount/trunk/src/lovely/mount/interfaces.py
===================================================================
--- lovely.mount/trunk/src/lovely/mount/interfaces.py	2009-07-26 13:33:28 UTC (rev 102310)
+++ lovely.mount/trunk/src/lovely/mount/interfaces.py	2009-07-27 01:21:35 UTC (rev 102311)
@@ -2,13 +2,13 @@
 from zope import interface
 from zope import schema
 from zope.interface.common.mapping import IMapping
-from zope.app.container.interfaces import IContainer
+from zope.container.interfaces import IContainer
 
 class IDBRoot(IMapping):
 
     dbName = schema.ASCII(title=_('Database Name'))
 
-    
+
 class IMountpointContainer(IContainer, IDBRoot):
 
     """a container which returns its values from another database"""

Modified: lovely.mount/trunk/src/lovely/mount/root.py
===================================================================
--- lovely.mount/trunk/src/lovely/mount/root.py	2009-07-26 13:33:28 UTC (rev 102310)
+++ lovely.mount/trunk/src/lovely/mount/root.py	2009-07-27 01:21:35 UTC (rev 102311)
@@ -1,8 +1,8 @@
-import interfaces
+from ZODB.interfaces import IDatabase
+from zope import component
 from zope import interface
-from zope import component
 from zope.schema.fieldproperty import FieldProperty
-from ZODB.interfaces import IDatabase
+import interfaces
 import persistent
 import transaction
 
@@ -27,13 +27,13 @@
         else:
             conn = self._p_jar
         return conn.get_connection(self.dbName)
-        
-    
+
+
     @property
     def _data(self):
         root = self._conn.root()
         return root
-        
+
     def keys(self):
         '''See interface `IReadContainer`'''
         return self._data.keys()

Modified: lovely.mount/trunk/src/lovely/mount/tests.py
===================================================================
--- lovely.mount/trunk/src/lovely/mount/tests.py	2009-07-26 13:33:28 UTC (rev 102310)
+++ lovely.mount/trunk/src/lovely/mount/tests.py	2009-07-27 01:21:35 UTC (rev 102311)
@@ -16,31 +16,30 @@
 $Id$
 """
 __docformat__ = "reStructuredText"
-
 import doctest
+import transaction
 import unittest
-import ZODB.tests.util, transaction
+import ZODB.tests.util
 from zope import component
-from zope.app.folder import rootFolder
+from zope.site.folder import rootFolder
 from zope.app.publication.zopepublication import ZopePublication
-from zope.app.testing import functional
-from zope.app.testing import setup
+from zope.app.testing import functional, setup
 from zope.testing.doctestunit import DocFileSuite
 from ZODB.interfaces import IDatabase
 from zope.schema.interfaces import IVocabularyFactory
-from vocabulary import DatabaseVocabulary
+from lovely.mount.vocabulary import DatabaseVocabulary
 
 from zope.app.schema import vocabulary
 
 
 def setUpBasic(test):
     vocabulary._clear()
-    component.provideUtility(DatabaseVocabulary, IVocabularyFactory, 
+    component.provideUtility(DatabaseVocabulary, IVocabularyFactory,
                              name="Database Names")
 
 def setUp(test):
     setup.placefulSetUp()
-    setUpBasic(test)    
+    setUpBasic(test)
     databases = {}
     db1 = ZODB.tests.util.DB(databases=databases, database_name='1')
     db2 = ZODB.tests.util.DB(databases=databases, database_name='2')

Modified: lovely.mount/trunk/src/lovely/mount/vocabulary.py
===================================================================
--- lovely.mount/trunk/src/lovely/mount/vocabulary.py	2009-07-26 13:33:28 UTC (rev 102310)
+++ lovely.mount/trunk/src/lovely/mount/vocabulary.py	2009-07-27 01:21:35 UTC (rev 102311)
@@ -1,4 +1,4 @@
-from zope.app.component.vocabulary import UtilityVocabulary
+from zope.componentvocabulary.vocabulary import UtilityVocabulary
 from ZODB.interfaces import IDatabase
 
 class DatabaseVocabulary(UtilityVocabulary):



More information about the Checkins mailing list