[Checkins] SVN: zope.server/trunk/ Document the PasteDeploy entry
point and added a demo WSGI app + PasteDeploy
Philipp von Weitershausen
philikon at philikon.de
Sat Jun 2 07:29:50 EDT 2007
Log message for revision 76150:
Document the PasteDeploy entry point and added a demo WSGI app + PasteDeploy
configuration (test.ini) that will let you test it. Simply run::
$ bin/paster serve test.ini
after bootstrapping the buildout
Changed:
U zope.server/trunk/README.txt
U zope.server/trunk/buildout.cfg
U zope.server/trunk/setup.py
A zope.server/trunk/src/zope/server/http/tests/wsgi_app.py
A zope.server/trunk/test.ini
-=-
Modified: zope.server/trunk/README.txt
===================================================================
--- zope.server/trunk/README.txt 2007-06-02 11:27:02 UTC (rev 76149)
+++ zope.server/trunk/README.txt 2007-06-02 11:29:49 UTC (rev 76150)
@@ -1,10 +1,21 @@
-zope.server Package Readme
-==========================
-
Overview
--------
-Zope 3's Servers.
-
This package contains generic base classes for channel-based servers, the
servers themselves and helper objects, such as tasks and requests.
+
+WSGI support
+------------
+
+zope.server's HTTP server comes with WSGI_ support.
+``zope.server.http.wsgihttpserver.WSGIHTTPServer`` can act as a WSGI
+gateway. There's also an entry point for PasteDeploy_ that lets you
+use zope.server's WSGI gateway from a configuration file, e.g.::
+
+ [server:main]
+ use = egg:zope.server
+ host = 127.0.0.1
+ port = 8080
+
+.. _WSGI: http://www.python.org/dev/peps/pep-0333/
+.. _PasteDeploy: http://pythonpaste.org/deploy/
Modified: zope.server/trunk/buildout.cfg
===================================================================
--- zope.server/trunk/buildout.cfg 2007-06-02 11:27:02 UTC (rev 76149)
+++ zope.server/trunk/buildout.cfg 2007-06-02 11:29:49 UTC (rev 76150)
@@ -1,9 +1,14 @@
[buildout]
develop = .
-parts = test
-
+parts = test paste-test
find-links = http://download.zope.org/distribution/
+[paste-test]
+recipe = zc.recipe.egg
+eggs = zope.server
+ PasteDeploy
+ PasteScript
+
[test]
recipe = zc.recipe.testrunner
eggs = zope.server
Modified: zope.server/trunk/setup.py
===================================================================
--- zope.server/trunk/setup.py 2007-06-02 11:27:02 UTC (rev 76149)
+++ zope.server/trunk/setup.py 2007-06-02 11:29:49 UTC (rev 76150)
@@ -27,9 +27,7 @@
description='Zope server',
author='Zope Corporation and Contributors',
author_email='zope3-dev at zope.org',
- long_description="This package contains generic base classes for"
- "channel-based servers, the servers themselves and"
- "helper objects, such as tasks and requests.",
+ long_description=open('README.txt').read(),
packages=find_packages('src'),
package_dir = {'': 'src'},
Added: zope.server/trunk/src/zope/server/http/tests/wsgi_app.py
===================================================================
--- zope.server/trunk/src/zope/server/http/tests/wsgi_app.py (rev 0)
+++ zope.server/trunk/src/zope/server/http/tests/wsgi_app.py 2007-06-02 11:29:49 UTC (rev 76150)
@@ -0,0 +1,11 @@
+# a WSGI app for testing
+
+def test_app(environ, start_response):
+ status = '200 OK'
+ response_headers = [('Content-type', 'text/plain')]
+ start_response(status, response_headers)
+ return ['Hello world!\n']
+
+def test_app_factory(global_config, **local_config):
+ return test_app
+
Property changes on: zope.server/trunk/src/zope/server/http/tests/wsgi_app.py
___________________________________________________________________
Name: svn:eol-style
+ native
Added: zope.server/trunk/test.ini
===================================================================
--- zope.server/trunk/test.ini (rev 0)
+++ zope.server/trunk/test.ini 2007-06-02 11:29:49 UTC (rev 76150)
@@ -0,0 +1,7 @@
+[app:main]
+paste.app_factory = zope.server.http.tests.wsgi_app:test_app_factory
+
+[server:main]
+use = egg:zope.server
+host = 127.0.0.1
+port = 8080
\ No newline at end of file
More information about the Checkins
mailing list