[Checkins] SVN: gocept.zope3instance/trunk/ - updated to support zope3.buildout

Christian Theune ct at gocept.com
Mon Feb 26 19:28:37 EST 2007


Log message for revision 72858:
   - updated to support zope3.buildout
  

Changed:
  _U  gocept.zope3instance/trunk/
  U   gocept.zope3instance/trunk/setup.py
  U   gocept.zope3instance/trunk/src/gocept/zope3instance/__init__.py
  U   gocept.zope3instance/trunk/src/gocept/zope3instance/skel/base.zcml
  U   gocept.zope3instance/trunk/src/gocept/zope3instance/skel/zope.conf.in
  U   gocept.zope3instance/trunk/src/gocept/zope3instance/zope3scripts.py

-=-

Property changes on: gocept.zope3instance/trunk
___________________________________________________________________
Name: svn:ignore
   - develop-eggs
eggs
bin
parts
.installed.cfg


   + develop-eggs
build
dist
eggs
bin
parts
.installed.cfg



Modified: gocept.zope3instance/trunk/setup.py
===================================================================
--- gocept.zope3instance/trunk/setup.py	2007-02-27 00:26:20 UTC (rev 72857)
+++ gocept.zope3instance/trunk/setup.py	2007-02-27 00:28:36 UTC (rev 72858)
@@ -3,7 +3,7 @@
 name = "gocept.zope3instance"
 setup(
     name = name,
-    version = "1.0b1",
+    version = "2.0a1",
     author = "Christian Theune",
     author_email = "ct at gocept.com",
     description = "zc.buildout recipe for defining a Zope 3 instance",
@@ -11,6 +11,7 @@
     license = "ZPL 2.1",
     keywords = "zope3 buildout",
     url='http://svn.zope.org/'+name,
+    classifiers = ["Framework :: Buildout"],
 
     zip_safe=False,
     packages = find_packages('src'),
@@ -18,8 +19,8 @@
     package_dir = {'':'src'},
     namespace_packages = ['gocept'],
     install_requires = ['zc.buildout', 'zope.testing', 'setuptools',
-                        'zc.recipe.egg'],
-    dependency_links = ['http://download.zope.org/distribution/'],
+                        'zc.recipe.egg', 'zope.app'],
+    dependency_links = ['http://amy.gocept.com/~ctheune/eggs/'],
     entry_points = {
         'zc.buildout': [
              'default = %s:Recipe' % name,

Modified: gocept.zope3instance/trunk/src/gocept/zope3instance/__init__.py
===================================================================
--- gocept.zope3instance/trunk/src/gocept/zope3instance/__init__.py	2007-02-27 00:26:20 UTC (rev 72857)
+++ gocept.zope3instance/trunk/src/gocept/zope3instance/__init__.py	2007-02-27 00:28:36 UTC (rev 72858)
@@ -41,9 +41,6 @@
             buildout['buildout']['directory'],
             'skels', name)
 
-        options['zope3-location'] = buildout[options.get('zope3', 'zope3')
-                                             ]['location']
-
         options['database-config'] = '\n'.join([
             buildout[section]['zconfig']
             for section in options['database'].split()
@@ -65,13 +62,7 @@
     def install(self):
         options = self.options
 
-        z3path = self.validateZ3Path(options['zope3-location'])
-
-        extra = options.get('extra-paths')
-        if extra:
-            extra += '\n' + z3path
-        else:
-            extra = z3path
+        extra = options.get('extra-paths', '')
         options['extra-paths'] = extra
 
         # Compute various paths
@@ -94,7 +85,7 @@
 
         # install subprograms and ctl scripts
         zc.buildout.easy_install.scripts(
-            [('runzope', 'zope.app.twisted.main', 'main')],
+            [('runzope', 'zope.app.server.main', 'main')],
             ws, options['executable'], options['subprogram_dir'],
             extra_paths = options['extra-paths'].split(),
             arguments = ('\n        ["-C", %r]'
@@ -196,33 +187,3 @@
 
             file(new_name, 'w').write(new_contents)
             os.remove(in_file)
-
-    @staticmethod
-    def validateZ3Path(path):
-        """Validate that a given absolute path is a Zope 3 installation or checkout.
-
-        Return the path that should be added to the PYTHONPATH for the generated
-        scripts.
-        """
-        def fail():
-            logger.error(
-                "The directory, %r, isn't a valid checkout or release."
-                % path)
-            raise zc.buildout.UserError(
-                "Invalid Zope 3 installation: ", path)
-
-            if not os.path.exists(path):
-                raise zc.buildout.UserError("No directory:", path)
-
-        # Check that either lib/python or src/ exists.
-        choices = [('lib', 'python'), ('src',)]
-        choices = map(lambda x:os.path.join(path, *x), choices)
-        valid_paths = filter(os.path.exists, choices)
-        if not valid_paths:
-            fail()
-
-        # Additionally zopeskel/etc must exist too.
-        skel = os.path.join(path, 'zopeskel', 'etc')
-        if not os.path.exists(skel):
-            fail()
-        return valid_paths[0]

Modified: gocept.zope3instance/trunk/src/gocept/zope3instance/skel/base.zcml
===================================================================
--- gocept.zope3instance/trunk/src/gocept/zope3instance/skel/base.zcml	2007-02-27 00:26:20 UTC (rev 72857)
+++ gocept.zope3instance/trunk/src/gocept/zope3instance/skel/base.zcml	2007-02-27 00:28:36 UTC (rev 72858)
@@ -1,5 +1,6 @@
 <configure xmlns="http://namespaces.zope.org/zope">
 
+  <include package="zope.app.zcmlfiles" file="meta.zcml"/>
   <include package="zope.app.zcmlfiles" />
 
   <!-- Include Zope dependencies here -->
@@ -9,11 +10,10 @@
   <include package="zope.security" file="meta.zcml"/>
   <include package="zope.traversing"/>
   <include package="zope.traversing.browser"/>
-  <include package="zope.app" file="meta.zcml"/>
   <include package="zope.app.securitypolicy" file="meta.zcml"/>
   <include package="zope.app.securitypolicy"/>
   <include package="zope.app.authentication"/>
-  <include package="zope.app.twisted"/>
+  <include package="zope.app.server"/>
 
 
   <!-- apidoc -->

Modified: gocept.zope3instance/trunk/src/gocept/zope3instance/skel/zope.conf.in
===================================================================
--- gocept.zope3instance/trunk/src/gocept/zope3instance/skel/zope.conf.in	2007-02-27 00:26:20 UTC (rev 72857)
+++ gocept.zope3instance/trunk/src/gocept/zope3instance/skel/zope.conf.in	2007-02-27 00:28:36 UTC (rev 72858)
@@ -9,7 +9,7 @@
 %(database-config)s
 
 <server>
-  type HTTP
+  type WSGI-HTTP
 #  type PostmortemDebuggingHTTP
   address %(address)s
 </server>

Modified: gocept.zope3instance/trunk/src/gocept/zope3instance/zope3scripts.py
===================================================================
--- gocept.zope3instance/trunk/src/gocept/zope3instance/zope3scripts.py	2007-02-27 00:26:20 UTC (rev 72857)
+++ gocept.zope3instance/trunk/src/gocept/zope3instance/zope3scripts.py	2007-02-27 00:28:36 UTC (rev 72858)
@@ -23,11 +23,11 @@
 import os, sys
 
 import zope.app.debug
-import zope.app.twisted.main
+import zope.app.server.main
 
 
 def zglobals(args):
-    db = zope.app.twisted.main.debug(args)
+    db = zope.app.server.main.debug(args)
     if "PYTHONSTARTUP" in os.environ:
         execfile(os.environ["PYTHONSTARTUP"])
 



More information about the Checkins mailing list