[Checkins] SVN: Zope2.buildout/trunk/setup.py ensure that setuptools picking up the right eggs based on their

Andreas Jung andreas at andreas-jung.com
Tue Jan 27 12:30:50 EST 2009


Log message for revision 95233:
  ensure that setuptools picking up the right eggs based on their
  version spec in version-zopeX.cfg
  
  

Changed:
  U   Zope2.buildout/trunk/setup.py

-=-
Modified: Zope2.buildout/trunk/setup.py
===================================================================
--- Zope2.buildout/trunk/setup.py	2009-01-27 17:29:48 UTC (rev 95232)
+++ Zope2.buildout/trunk/setup.py	2009-01-27 17:30:49 UTC (rev 95233)
@@ -17,6 +17,21 @@
 
 EXTENSIONCLASS_INCLUDEDIRS = ['include', 'src']
 
+from util import getVersionForPackage
+def getPackages(packages):
+    """ Return a list of egg names together with their
+        version specs according to the version-zopeX.cfg
+        files.
+    """
+    result = list()
+    for package in packages:
+        if ' ' in package:
+            package = package[:package.find(' ')]
+        version = getVersionForPackage(package)
+        result.append('%s==%s' % (package, version))
+    return result
+
+
 setup(name='Zope2',
       version = '2.12.dev',
       url='http://www.zope.org',
@@ -121,7 +136,7 @@
 
       ],
 
-      install_requires=[
+      install_requires=getPackages([
         'Acquisition',
         'DateTime',
         'docutils',
@@ -173,10 +188,10 @@
         'zope.app.publisher',
         'zope.app.schema',
         'zope.app.testing',
-      ],
+      ]),
 
       extras_require = dict(
-        zope_app = [
+        zope_app = getPackages([
           'zope.annotation',
           'zope.cachedescriptors',
           'zope.copypastemove',
@@ -241,7 +256,7 @@
           'zope.app.zcmlfiles',
           'zope.app.zopeappgenerations',
           'zope.app.zptpage',
-          ],
+          ]),
       ),
 
       include_package_data=True,



More information about the Checkins mailing list