[Checkins] SVN: z3ext.pathindex/trunk/ ztk support

Nikolay Kim fafhrd91 at gmail.com
Tue Dec 1 23:08:41 EST 2009


Log message for revision 106155:
  ztk support

Changed:
  U   z3ext.pathindex/trunk/CHANGES.txt
  U   z3ext.pathindex/trunk/bootstrap.py
  U   z3ext.pathindex/trunk/setup.py
  U   z3ext.pathindex/trunk/src/z3ext/pathindex/index.py
  U   z3ext.pathindex/trunk/src/z3ext/pathindex/interfaces.py
  U   z3ext.pathindex/trunk/src/z3ext/pathindex/tests.py

-=-
Modified: z3ext.pathindex/trunk/CHANGES.txt
===================================================================
--- z3ext.pathindex/trunk/CHANGES.txt	2009-12-02 03:51:03 UTC (rev 106154)
+++ z3ext.pathindex/trunk/CHANGES.txt	2009-12-02 04:08:40 UTC (rev 106155)
@@ -2,6 +2,14 @@
 CHANGES
 =======
 
+1.1.0 (Unreleased)
+------------------
+
+- ZTK support
+
+- Copyright holder changed
+
+
 1.0.2 (2009-03-12)
 ------------------
 

Modified: z3ext.pathindex/trunk/bootstrap.py
===================================================================
--- z3ext.pathindex/trunk/bootstrap.py	2009-12-02 03:51:03 UTC (rev 106154)
+++ z3ext.pathindex/trunk/bootstrap.py	2009-12-02 04:08:40 UTC (rev 106155)
@@ -24,27 +24,52 @@
 
 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)
+is_jython = sys.platform.startswith('java')
 
-import pkg_resources
+try:
+    import pkg_resources
+except ImportError:
+    ez = {}
+    exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
+                         ).read() in ez
+    ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
 
-cmd = 'from setuptools.command.easy_install import main; main()'
+    import pkg_resources
+
 if sys.platform == 'win32':
-    cmd = '"%s"' % cmd # work around spawn lamosity on windows
+    def quote(c):
+        if ' ' in c:
+            return '"%s"' % c # work around spawn lamosity on windows
+        else:
+            return c
+else:
+    def quote (c):
+        return c
 
-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
+cmd = 'from setuptools.command.easy_install import main; main()'
+ws  = pkg_resources.working_set
 
+if is_jython:
+    import subprocess
+
+    assert subprocess.Popen([sys.executable] + ['-c', quote(cmd), '-mqNxd',
+           quote(tmpeggs), 'zc.buildout'],
+           env=dict(os.environ,
+               PYTHONPATH=
+               ws.find(pkg_resources.Requirement.parse('setuptools')).location
+               ),
+           ).wait() == 0
+
+else:
+    assert os.spawnle(
+        os.P_WAIT, sys.executable, quote (sys.executable),
+        '-c', quote (cmd), '-mqNxd', quote (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

Modified: z3ext.pathindex/trunk/setup.py
===================================================================
--- z3ext.pathindex/trunk/setup.py	2009-12-02 03:51:03 UTC (rev 106154)
+++ z3ext.pathindex/trunk/setup.py	2009-12-02 04:08:40 UTC (rev 106155)
@@ -21,7 +21,7 @@
 def read(*rnames):
     return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
 
-version='1.0.3dev'
+version='0'
 
 
 setup(name = 'z3ext.pathindex',
@@ -47,7 +47,7 @@
         'Operating System :: OS Independent',
         'Topic :: Internet :: WWW/HTTP',
         'Framework :: Zope3'],
-      url='http://z3ext.net/',
+      url='http://pypi.python.org/pypi/z3ext.pathindex/',
       license='ZPL 2.1',
       packages=find_packages('src'),
       package_dir = {'':'src'},
@@ -56,17 +56,16 @@
                           'zope.component',
                           'zope.interface',
                           'zope.traversing',
-                          'zope.app.intid',
-                          'zope.app.catalog',
+                          'zope.intid',
+                          'zope.catalog',
                           'zc.catalog',
                           ],
      extras_require = dict(test=['ZODB3',
                                  'zope.app.testing',
                                  'zope.testing',
-                                 'zope.app.keyreference',
-                                 'zope.app.container',
+                                 'zope.keyreference',
+                                 'zope.container',
                                  'zope.location',
-                                 'zope.event',
                                  ]),
       include_package_data = True,
       zip_safe = False

Modified: z3ext.pathindex/trunk/src/z3ext/pathindex/index.py
===================================================================
--- z3ext.pathindex/trunk/src/z3ext/pathindex/index.py	2009-12-02 03:51:03 UTC (rev 106154)
+++ z3ext.pathindex/trunk/src/z3ext/pathindex/index.py	2009-12-02 04:08:40 UTC (rev 106155)
@@ -19,7 +19,7 @@
 from zope.component import getUtility
 from zope.proxy import removeAllProxies
 from zope.traversing.api import getParents
-from zope.app.intid.interfaces import IIntIds
+from zope.intid.interfaces import IIntIds
 from zc.catalog.index import SetIndex, parseQuery
 
 from interfaces import IPathIndex

Modified: z3ext.pathindex/trunk/src/z3ext/pathindex/interfaces.py
===================================================================
--- z3ext.pathindex/trunk/src/z3ext/pathindex/interfaces.py	2009-12-02 03:51:03 UTC (rev 106154)
+++ z3ext.pathindex/trunk/src/z3ext/pathindex/interfaces.py	2009-12-02 04:08:40 UTC (rev 106155)
@@ -15,7 +15,7 @@
 
 $Id$
 """
-from zope.app.catalog.interfaces import ICatalogIndex
+from zope.catalog.interfaces import ICatalogIndex
 
 
 class IPathIndex(ICatalogIndex):

Modified: z3ext.pathindex/trunk/src/z3ext/pathindex/tests.py
===================================================================
--- z3ext.pathindex/trunk/src/z3ext/pathindex/tests.py	2009-12-02 03:51:03 UTC (rev 106154)
+++ z3ext.pathindex/trunk/src/z3ext/pathindex/tests.py	2009-12-02 04:08:40 UTC (rev 106155)
@@ -24,17 +24,17 @@
 from zope.app.testing import setup
 from zope.traversing import testing
 from zope.location.interfaces import ILocation
-from zope.app.container.sample import SampleContainer
+from zope.container.sample import SampleContainer
 
 from persistent import Persistent
 from persistent.interfaces import IPersistent
 from transaction import commit
 from ZODB.interfaces import IConnection
-from zope.app.intid import IntIds
-from zope.app.intid.interfaces import IIntIds
-from zope.app.keyreference.persistent import KeyReferenceToPersistent
-from zope.app.keyreference.persistent import connectionOfPersistent
-from zope.app.keyreference.interfaces import IKeyReference
+from zope.intid import IntIds
+from zope.intid.interfaces import IIntIds
+from zope.keyreference.persistent import KeyReferenceToPersistent
+from zope.keyreference.persistent import connectionOfPersistent
+from zope.keyreference.interfaces import IKeyReference
 
 
 class ConnectionStub(object):



More information about the checkins mailing list