Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added initial implementation.
Need as next to include svn:externals 
for un-egged packages
  • Loading branch information
projekt01 committed Sep 27, 2007
0 parents commit 6de6cde
Show file tree
Hide file tree
Showing 18 changed files with 421 additions and 0 deletions.
1 change: 1 addition & 0 deletions AUTHOR.txt
@@ -0,0 +1 @@
Roger Ineichen (roger <at> projekt01 <dot> ch)
8 changes: 8 additions & 0 deletions CHANGES.txt
@@ -0,0 +1,8 @@
=======
CHANGES
=======

Version 0.5.0 (unreleased)
--------------------------

- Initial Release
54 changes: 54 additions & 0 deletions LICENSE.txt
@@ -0,0 +1,54 @@
Zope Public License (ZPL) Version 2.1
-------------------------------------

A copyright notice accompanies this license document that
identifies the copyright holders.

This license has been certified as open source. It has also
been designated as GPL compatible by the Free Software
Foundation (FSF).

Redistribution and use in source and binary forms, with or
without modification, are permitted provided that the
following conditions are met:

1. Redistributions in source code must retain the
accompanying copyright notice, this list of conditions,
and the following disclaimer.

2. Redistributions in binary form must reproduce the accompanying
copyright notice, this list of conditions, and the
following disclaimer in the documentation and/or other
materials provided with the distribution.

3. Names of the copyright holders must not be used to
endorse or promote products derived from this software
without prior written permission from the copyright
holders.

4. The right to distribute this software or to use it for
any purpose does not give you the right to use
Servicemarks (sm) or Trademarks (tm) of the copyright
holders. Use of them is covered by separate agreement
with the copyright holders.

5. If any files are modified, you must cause the modified
files to carry prominent notices stating that you changed
the files and the date of any change.

Disclaimer

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS''
AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
NO EVENT SHALL THE COPYRIGHT HOLDERS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
2 changes: 2 additions & 0 deletions README.txt
@@ -0,0 +1,2 @@
This package provides a layer based on z3c.form and z3c.pagelet. This layer can
be used in suctom skins.
52 changes: 52 additions & 0 deletions bootstrap.py
@@ -0,0 +1,52 @@
##############################################################################
#
# 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.
#
##############################################################################
"""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: bootstrap.py 75940 2007-05-24 14:45:00Z srichter $
"""

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)
7 changes: 7 additions & 0 deletions buildout.cfg
@@ -0,0 +1,7 @@
[buildout]
develop = .
parts = test

[test]
recipe = zc.recipe.testrunner
eggs = z3c.layer.ready2go [test]
75 changes: 75 additions & 0 deletions setup.py
@@ -0,0 +1,75 @@
##############################################################################
#
# Copyright (c) 2007 Zope Foundation 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
$Id:$
"""
import os
from setuptools import setup, find_packages

def read(*rnames):
return open(os.path.join(os.path.dirname(__file__), *rnames)).read()

setup (
name='z3c.layer.ready2go',
version='0.5.0',
author = "Stephan Richter, Roger Ineichen and the Zope Community",
author_email = "zope3-dev@zope.org",
description = "A ready to go layer for Zope3",
long_description=(
read('README.txt')
+ '\n\n' +
read('CHANGES.txt')
),
license = "ZPL 2.1",
keywords = "zope3 z3c ready 2 go layer",
classifiers = [
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: Zope Public License',
'Programming Language :: Python',
'Natural Language :: English',
'Operating System :: OS Independent',
'Topic :: Internet :: WWW/HTTP',
'Framework :: Zope3'],
url = 'http://cheeseshop.python.org/pypi/z3c.layer.ready2go',
packages = find_packages('src'),
include_package_data = True,
package_dir = {'':'src'},
namespace_packages = ['z3c'],
extras_require = dict(
test = [
'zope.testbrowser',
'zope.app.securitypolicy',
'zope.app.testing',
'zope.app.zcmlfiles',
'zope.app.twisted',
'zope.viewlet',
'z3c.pagelet',
'z3c.form'
],
),
install_requires = [
'setuptools',
'zope.configuration',
'zope.traversing',
'zope.app.http',
'zope.app.publisher',
'zope.viewlet',
'z3c.pagelet',
'z3c.form'
],
zip_safe = False,
)
7 changes: 7 additions & 0 deletions src/z3c/__init__.py
@@ -0,0 +1,7 @@
# this is a namespace package
try:
import pkg_resources
pkg_resources.declare_namespace(__name__)
except ImportError:
import pkgutil
__path__ = pkgutil.extend_path(__path__, __name__)
7 changes: 7 additions & 0 deletions src/z3c/layer/__init__.py
@@ -0,0 +1,7 @@
# this is a namespace package
try:
import pkg_resources
pkg_resources.declare_namespace(__name__)
except ImportError:
import pkgutil
__path__ = pkgutil.extend_path(__path__, __name__)
6 changes: 6 additions & 0 deletions src/z3c/layer/ready2go/README.txt
@@ -0,0 +1,6 @@
======
README
======

This package contains the ready2go layer. This layer supports a correct set of
component registration and can be used for inheritation in custom skins.
3 changes: 3 additions & 0 deletions src/z3c/layer/ready2go/SETUP.cfg
@@ -0,0 +1,3 @@
<data-files zopeskel/etc/package-includes>
z3c.layer.ready2go-*.zcml
</data-files>
26 changes: 26 additions & 0 deletions src/z3c/layer/ready2go/__init__.py
@@ -0,0 +1,26 @@
##############################################################################
#
# Copyright (c) 2007 Zope Foundation 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.
#
##############################################################################
"""
$Id: __init__.py 97 2007-03-29 22:58:27Z rineichen $
"""

import z3c.layer.pagelet
import z3c.form.interfaces
import z3c.formui.interfaces


class IReady2GoBrowserLayer(z3c.layer.pagelet.IPageletBrowserLayer,
z3c.formui.interfaces.IDivFormLayer,
z3c.form.interfaces.IFormLayer):
"""A ready 2 go layer useful for custom applications."""
12 changes: 12 additions & 0 deletions src/z3c/layer/ready2go/configure.zcml
@@ -0,0 +1,12 @@
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:browser="http://namespaces.zope.org/browser"
xmlns:i18n="http://namespaces.zope.org/i18n"
i18n_domain="z3c">

<interface
interface="z3c.layer.ready2go.IReady2GoBrowserLayer"
type="zope.publisher.interfaces.browser.IBrowserSkinType"
/>

</configure>
33 changes: 33 additions & 0 deletions src/z3c/layer/ready2go/tests/__init__.py
@@ -0,0 +1,33 @@
##############################################################################
#
# Copyright (c) 2007 Zope Foundation 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.
#
##############################################################################
"""
$Id: __init__.py 97 2007-03-29 22:58:27Z rineichen $
"""

import zope.interface
import zope.component
from zope.publisher.browser import BrowserPage
from zope.security.interfaces import Unauthorized
from zope.exceptions.interfaces import UserError

from z3c.pagelet import browser
import z3c.layer.ready2go


class ITestSkin(z3c.layer.ready2go.IReady2GoBrowserLayer):
"""The ready2go layer test skin."""


class TestPage(browser.BrowserPagelet):
"""Test page."""

0 comments on commit 6de6cde

Please sign in to comment.