[Checkins] SVN: Sandbox/baijum/z3hello/trunk/ Initial commit of
z3hello.
Baiju M
baiju.m.mail at gmail.com
Mon Mar 19 05:00:31 EDT 2007
Log message for revision 73331:
Initial commit of z3hello.
Changed:
_U Sandbox/baijum/z3hello/trunk/
A Sandbox/baijum/z3hello/trunk/README.txt
A Sandbox/baijum/z3hello/trunk/bootstrap.py
A Sandbox/baijum/z3hello/trunk/buildout.cfg
A Sandbox/baijum/z3hello/trunk/recipes/
A Sandbox/baijum/z3hello/trunk/recipes/__init__.py
A Sandbox/baijum/z3hello/trunk/recipes/setup.py
A Sandbox/baijum/z3hello/trunk/recipes/zope3recipes.py
A Sandbox/baijum/z3hello/trunk/setup.py
A Sandbox/baijum/z3hello/trunk/src/
A Sandbox/baijum/z3hello/trunk/src/z3hello/
A Sandbox/baijum/z3hello/trunk/src/z3hello/__init__.py
A Sandbox/baijum/z3hello/trunk/src/z3hello/configure.zcml
A Sandbox/baijum/z3hello/trunk/src/z3hello/views.py
-=-
Property changes on: Sandbox/baijum/z3hello/trunk
___________________________________________________________________
Name: svn:ignore
+ bin
build
dist
lib
develop-eggs
eggs
parts
.installed.cfg
Added: Sandbox/baijum/z3hello/trunk/README.txt
===================================================================
--- Sandbox/baijum/z3hello/trunk/README.txt 2007-03-19 08:52:01 UTC (rev 73330)
+++ Sandbox/baijum/z3hello/trunk/README.txt 2007-03-19 09:00:31 UTC (rev 73331)
@@ -0,0 +1,14 @@
+*******
+z3hello
+*******
+
+A Zope 3 hello app using buildout.
+
+Releases
+********
+
+==================
+0.1 (2007/03/19)
+==================
+
+Initial release of Zope 3 hello app.
Property changes on: Sandbox/baijum/z3hello/trunk/README.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Added: Sandbox/baijum/z3hello/trunk/bootstrap.py
===================================================================
--- Sandbox/baijum/z3hello/trunk/bootstrap.py 2007-03-19 08:52:01 UTC (rev 73330)
+++ Sandbox/baijum/z3hello/trunk/bootstrap.py 2007-03-19 09:00:31 UTC (rev 73331)
@@ -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: Sandbox/baijum/z3hello/trunk/bootstrap.py
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added: Sandbox/baijum/z3hello/trunk/buildout.cfg
===================================================================
--- Sandbox/baijum/z3hello/trunk/buildout.cfg 2007-03-19 08:52:01 UTC (rev 73330)
+++ Sandbox/baijum/z3hello/trunk/buildout.cfg 2007-03-19 09:00:31 UTC (rev 73331)
@@ -0,0 +1,53 @@
+[buildout]
+develop = . recipes
+parts = helloapp instance test
+
+find-links = http://download.zope.org/distribution/
+
+[helloapp]
+recipe = recipes:application
+site.zcml = <configure
+ xmlns="http://namespaces.zope.org/zope"
+ i18n_domain="zope"
+ >
+ <include package="zope.app.zcmlfiles" />
+ <include package="zope.app.authentication" />
+ <include package="zope.app.securitypolicy" />
+ <include package="zope.app.twisted" />
+ <unauthenticatedPrincipal
+ id="zope.anybody"
+ title="Unauthenticated User" />
+ <include package="zope.app.securitypolicy" file="meta.zcml"/>
+ <securityPolicy
+ component="zope.app.securitypolicy.zopepolicy.ZopeSecurityPolicy" />
+ <role id="zope.Anonymous" title="Everybody"
+ description="All users have this role implicitly" />
+ <grant permission="zope.View"
+ role="zope.Anonymous" />
+ <include package="z3hello" />
+ <principal
+ id="zope.manager"
+ title="Manager"
+ login="admin"
+ password="admin"
+ />
+ <role id="zope.Manager" title="Site Manager" />
+ <grant
+ role="zope.Manager"
+ principal="zope.manager"
+ />
+ </configure>
+eggs = z3hello
+
+[instance]
+recipe = zc.zope3recipes:instance
+application = helloapp
+zope.conf = ${database:zconfig}
+
+[database]
+recipe = zc.recipe.filestorage
+
+[test]
+recipe = zc.recipe.testrunner
+defaults = ['--tests-pattern', '^f?tests$']
+eggs = z3hello
Property changes on: Sandbox/baijum/z3hello/trunk/buildout.cfg
___________________________________________________________________
Name: svn:eol-style
+ native
Added: Sandbox/baijum/z3hello/trunk/recipes/__init__.py
===================================================================
--- Sandbox/baijum/z3hello/trunk/recipes/__init__.py 2007-03-19 08:52:01 UTC (rev 73330)
+++ Sandbox/baijum/z3hello/trunk/recipes/__init__.py 2007-03-19 09:00:31 UTC (rev 73331)
@@ -0,0 +1 @@
+# Python Package
Property changes on: Sandbox/baijum/z3hello/trunk/recipes/__init__.py
___________________________________________________________________
Name: svn:eol-style
+ native
Added: Sandbox/baijum/z3hello/trunk/recipes/setup.py
===================================================================
--- Sandbox/baijum/z3hello/trunk/recipes/setup.py 2007-03-19 08:52:01 UTC (rev 73330)
+++ Sandbox/baijum/z3hello/trunk/recipes/setup.py 2007-03-19 09:00:31 UTC (rev 73331)
@@ -0,0 +1,7 @@
+from setuptools import setup
+
+setup(
+ name = "recipes",
+ install_requires = ['zc.recipe.egg'],
+ entry_points = {'zc.buildout': ['application = zope3recipes:Application']},
+ )
Property changes on: Sandbox/baijum/z3hello/trunk/recipes/setup.py
___________________________________________________________________
Name: svn:eol-style
+ native
Added: Sandbox/baijum/z3hello/trunk/recipes/zope3recipes.py
===================================================================
--- Sandbox/baijum/z3hello/trunk/recipes/zope3recipes.py 2007-03-19 08:52:01 UTC (rev 73330)
+++ Sandbox/baijum/z3hello/trunk/recipes/zope3recipes.py 2007-03-19 09:00:31 UTC (rev 73331)
@@ -0,0 +1,65 @@
+import os
+import logging
+import zc.buildout
+import zc.recipe.egg
+
+server_types = {
+ # name (module, http-name)
+ 'twisted': ('zope.app.twisted.main', 'HTTP'),
+ 'zserver': ('zope.app.server.main', 'WSGI-HTTP'),
+ }
+
+
+class Application(object):
+
+ def __init__(self, buildout, name, options):
+ self.name, self.options = name, options
+ wd = options.get('working-directory', '')
+ if not wd:
+ options['location'] = os.path.join(
+ buildout['buildout']['parts-directory'], name)
+
+ options['bin-directory'] = buildout['buildout']['bin-directory']
+ options['run-directory'] = os.path.join(
+ buildout['buildout']['parts-directory'],
+ self.name,
+ )
+
+ options['servers'] = options.get('servers', 'twisted')
+ if options['servers'] not in server_types:
+ raise ValueError(
+ 'servers setting must be one of "twisted" or "zserver"')
+
+ options['scripts'] = ''
+ self.egg = zc.recipe.egg.Egg(buildout, name, options)
+
+ def install(self):
+ options = self.options
+ dest = []
+ wd = options.get('working-directory', '')
+ if not wd:
+ wd = options['location']
+ if os.path.exists(wd):
+ assert os.path.isdir(wd)
+ else:
+ os.mkdir(wd)
+ dest.append(wd)
+ fd = open(os.path.join(wd, 'site.zcml'), 'w')
+ fd.write(options['site.zcml'])
+ fd.close()
+
+
+ self.egg.install()
+ requirements, ws = self.egg.working_set()
+
+ # install subprograms and ctl scripts
+ server_module = server_types[options['servers']][0]
+ zc.buildout.easy_install.scripts(
+ [('runzope', server_module, 'main')],
+ ws, options['executable'], wd,
+ )
+
+ return dest
+
+ def update(self):
+ pass
Property changes on: Sandbox/baijum/z3hello/trunk/recipes/zope3recipes.py
___________________________________________________________________
Name: svn:eol-style
+ native
Added: Sandbox/baijum/z3hello/trunk/setup.py
===================================================================
--- Sandbox/baijum/z3hello/trunk/setup.py 2007-03-19 08:52:01 UTC (rev 73330)
+++ Sandbox/baijum/z3hello/trunk/setup.py 2007-03-19 09:00:31 UTC (rev 73331)
@@ -0,0 +1,39 @@
+##############################################################################
+#
+# Copyright (c) 2007 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.
+#
+##############################################################################
+"""Setup for z3hello package
+
+$Id$
+"""
+
+from setuptools import setup, find_packages
+
+setup(name = 'z3hello',
+ version = '0.1',
+ url = 'http://svn.zope.org/Sandbox/baijum/z3hello/trunk',
+ license = 'ZPL 2.1',
+ description = 'A Zope 3 hello app using buildout',
+ author = 'Zope Corporation and Contributors',
+ author_email = 'zope3-dev at zope.org',
+ long_description = "",
+
+ packages = find_packages('src'),
+ package_dir = {'': 'src'},
+
+ tests_require = ['zope.testing'],
+ install_requires = ['setuptools',
+ 'zope.app'],
+
+ include_package_data = True,
+ zip_safe = False,
+ )
Property changes on: Sandbox/baijum/z3hello/trunk/setup.py
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added: Sandbox/baijum/z3hello/trunk/src/z3hello/__init__.py
===================================================================
--- Sandbox/baijum/z3hello/trunk/src/z3hello/__init__.py 2007-03-19 08:52:01 UTC (rev 73330)
+++ Sandbox/baijum/z3hello/trunk/src/z3hello/__init__.py 2007-03-19 09:00:31 UTC (rev 73331)
@@ -0,0 +1 @@
+# Python package
Property changes on: Sandbox/baijum/z3hello/trunk/src/z3hello/__init__.py
___________________________________________________________________
Name: svn:eol-style
+ native
Added: Sandbox/baijum/z3hello/trunk/src/z3hello/configure.zcml
===================================================================
--- Sandbox/baijum/z3hello/trunk/src/z3hello/configure.zcml 2007-03-19 08:52:01 UTC (rev 73330)
+++ Sandbox/baijum/z3hello/trunk/src/z3hello/configure.zcml 2007-03-19 09:00:31 UTC (rev 73331)
@@ -0,0 +1,11 @@
+<configure
+ xmlns="http://namespaces.zope.org/browser">
+
+ <page
+ for="*"
+ name="hello"
+ permission="zope.Public"
+ class=".views.HelloView"
+ />
+
+</configure>
Property changes on: Sandbox/baijum/z3hello/trunk/src/z3hello/configure.zcml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: Sandbox/baijum/z3hello/trunk/src/z3hello/views.py
===================================================================
--- Sandbox/baijum/z3hello/trunk/src/z3hello/views.py 2007-03-19 08:52:01 UTC (rev 73330)
+++ Sandbox/baijum/z3hello/trunk/src/z3hello/views.py 2007-03-19 09:00:31 UTC (rev 73331)
@@ -0,0 +1,6 @@
+from zope.publisher.browser import BrowserView
+
+class HelloView(BrowserView):
+
+ def __call__(self):
+ return "Hello"
Property changes on: Sandbox/baijum/z3hello/trunk/src/z3hello/views.py
___________________________________________________________________
Name: svn:eol-style
+ native
More information about the Checkins
mailing list