[Checkins] SVN: z3c.recipe.eggbasket/trunk/ initial import of default paster recipe

Maurits van Rees m.van.rees at zestsoftware.nl
Mon May 5 08:48:45 EDT 2008


Log message for revision 86446:
  initial import of default paster recipe

Changed:
  A   z3c.recipe.eggbasket/trunk/CHANGES.txt
  A   z3c.recipe.eggbasket/trunk/CONTRIBUTORS.txt
  A   z3c.recipe.eggbasket/trunk/README.txt
  A   z3c.recipe.eggbasket/trunk/bootstrap.py
  A   z3c.recipe.eggbasket/trunk/buildout.cfg
  A   z3c.recipe.eggbasket/trunk/setup.cfg
  A   z3c.recipe.eggbasket/trunk/setup.py
  A   z3c.recipe.eggbasket/trunk/z3c/
  A   z3c.recipe.eggbasket/trunk/z3c/__init__.py
  A   z3c.recipe.eggbasket/trunk/z3c/recipe/
  A   z3c.recipe.eggbasket/trunk/z3c/recipe/__init__.py
  A   z3c.recipe.eggbasket/trunk/z3c/recipe/eggbasket/
  A   z3c.recipe.eggbasket/trunk/z3c/recipe/eggbasket/README.txt
  A   z3c.recipe.eggbasket/trunk/z3c/recipe/eggbasket/__init__.py
  A   z3c.recipe.eggbasket/trunk/z3c/recipe/eggbasket/tests/
  A   z3c.recipe.eggbasket/trunk/z3c/recipe/eggbasket/tests/__init__.py
  A   z3c.recipe.eggbasket/trunk/z3c/recipe/eggbasket/tests/test_docs.py

-=-
Added: z3c.recipe.eggbasket/trunk/CHANGES.txt
===================================================================
--- z3c.recipe.eggbasket/trunk/CHANGES.txt	                        (rev 0)
+++ z3c.recipe.eggbasket/trunk/CHANGES.txt	2008-05-05 12:48:43 UTC (rev 86446)
@@ -0,0 +1,4 @@
+0.1.0 (xxxx-xx-xx)
+==================
+
+ - Created recipe with ZopeSkel [Grok Team].


Property changes on: z3c.recipe.eggbasket/trunk/CHANGES.txt
___________________________________________________________________
Name: svn:eol-style
   + native

Added: z3c.recipe.eggbasket/trunk/CONTRIBUTORS.txt
===================================================================
--- z3c.recipe.eggbasket/trunk/CONTRIBUTORS.txt	                        (rev 0)
+++ z3c.recipe.eggbasket/trunk/CONTRIBUTORS.txt	2008-05-05 12:48:43 UTC (rev 86446)
@@ -0,0 +1,2 @@
+Grok Team, Author
+


Property changes on: z3c.recipe.eggbasket/trunk/CONTRIBUTORS.txt
___________________________________________________________________
Name: svn:eol-style
   + native

Added: z3c.recipe.eggbasket/trunk/README.txt
===================================================================
--- z3c.recipe.eggbasket/trunk/README.txt	                        (rev 0)
+++ z3c.recipe.eggbasket/trunk/README.txt	2008-05-05 12:48:43 UTC (rev 86446)
@@ -0,0 +1,8 @@
+.. contents::
+
+.. Note to recipe author!
+   ---------------------
+   Update the following URL to point to your code repository or remove
+   it if one is not available.
+
+Code repository: http://svn.somewhere.com/...


Property changes on: z3c.recipe.eggbasket/trunk/README.txt
___________________________________________________________________
Name: svn:eol-style
   + native

Added: z3c.recipe.eggbasket/trunk/bootstrap.py
===================================================================
--- z3c.recipe.eggbasket/trunk/bootstrap.py	                        (rev 0)
+++ z3c.recipe.eggbasket/trunk/bootstrap.py	2008-05-05 12:48:43 UTC (rev 86446)
@@ -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: z3c.recipe.eggbasket/trunk/bootstrap.py
___________________________________________________________________
Name: svn:eol-style
   + native

Added: z3c.recipe.eggbasket/trunk/buildout.cfg
===================================================================
--- z3c.recipe.eggbasket/trunk/buildout.cfg	                        (rev 0)
+++ z3c.recipe.eggbasket/trunk/buildout.cfg	2008-05-05 12:48:43 UTC (rev 86446)
@@ -0,0 +1,8 @@
+[buildout]
+develop = .
+parts = test
+
+[test]
+recipe = zc.recipe.testrunner
+eggs = z3c.recipe.eggbasket [test]
+


Property changes on: z3c.recipe.eggbasket/trunk/buildout.cfg
___________________________________________________________________
Name: svn:eol-style
   + native

Added: z3c.recipe.eggbasket/trunk/setup.cfg
===================================================================
--- z3c.recipe.eggbasket/trunk/setup.cfg	                        (rev 0)
+++ z3c.recipe.eggbasket/trunk/setup.cfg	2008-05-05 12:48:43 UTC (rev 86446)
@@ -0,0 +1,3 @@
+[egg_info]
+tag_build = dev
+tag_svn_revision = true


Property changes on: z3c.recipe.eggbasket/trunk/setup.cfg
___________________________________________________________________
Name: svn:eol-style
   + native

Added: z3c.recipe.eggbasket/trunk/setup.py
===================================================================
--- z3c.recipe.eggbasket/trunk/setup.py	                        (rev 0)
+++ z3c.recipe.eggbasket/trunk/setup.py	2008-05-05 12:48:43 UTC (rev 86446)
@@ -0,0 +1,68 @@
+# -*- coding: utf-8 -*-
+"""
+This module contains the tool of z3c.recipe.eggbasket
+"""
+import os
+from setuptools import setup, find_packages
+
+def read(*rnames):
+    return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
+
+version = '0.1.0'
+
+long_description = (
+    read('README.txt')
+    + '\n' +
+    'Change history\n'
+    '**************\n'
+    + '\n' + 
+    read('CHANGES.txt')
+    + '\n' +
+    'Detailed Documentation\n'
+    '**********************\n'
+    + '\n' +
+    read('z3c', 'recipe', 'eggbasket', 'README.txt')
+    + '\n' +
+    'Contributors\n' 
+    '************\n'
+    + '\n' +
+    read('CONTRIBUTORS.txt')
+    + '\n' +
+    'Download\n'
+    '********\n'
+    )
+entry_point = 'z3c.recipe.eggbasket:Recipe'
+entry_points = {"zc.buildout": ["default = %s" % entry_point]}
+
+tests_require=['zope.testing']
+
+setup(name='z3c.recipe.eggbasket',
+      version=version,
+      description="Install eggs from a tarball.",
+      long_description=long_description,
+      # Get more strings from http://www.python.org/pypi?%3Aaction=list_classifiers
+      classifiers=[
+        'Framework :: Buildout',
+        'Intended Audience :: Developers',
+        'Topic :: Software Development :: Build Tools',
+        'Topic :: Software Development :: Libraries :: Python Modules',
+        'License :: OSI Approved :: Zope Public License',
+        ],
+      keywords='',
+      author='Grok Team',
+      author_email='grok-dev at zope.org',
+      url='https://launchpad.net/grok',
+      license='ZPL',
+      packages=find_packages(exclude=['ez_setup']),
+      namespace_packages=['z3c.recipe'],
+      include_package_data=True,
+      zip_safe=False,
+      install_requires=['setuptools',
+                        'zc.buildout'
+                        # -*- Extra requirements: -*-
+                        ],
+      tests_require=tests_require,
+      extras_require=dict(tests=tests_require),
+      test_suite = 'z3c.recipe.eggbasket.tests.test_docs.test_suite',
+      entry_points=entry_points,
+      )


Property changes on: z3c.recipe.eggbasket/trunk/setup.py
___________________________________________________________________
Name: svn:eol-style
   + native

Added: z3c.recipe.eggbasket/trunk/z3c/__init__.py
===================================================================
--- z3c.recipe.eggbasket/trunk/z3c/__init__.py	                        (rev 0)
+++ z3c.recipe.eggbasket/trunk/z3c/__init__.py	2008-05-05 12:48:43 UTC (rev 86446)
@@ -0,0 +1,6 @@
+# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
+try:
+    __import__('pkg_resources').declare_namespace(__name__)
+except ImportError:
+    from pkgutil import extend_path
+    __path__ = extend_path(__path__, __name__)


Property changes on: z3c.recipe.eggbasket/trunk/z3c/__init__.py
___________________________________________________________________
Name: svn:eol-style
   + native

Added: z3c.recipe.eggbasket/trunk/z3c/recipe/__init__.py
===================================================================
--- z3c.recipe.eggbasket/trunk/z3c/recipe/__init__.py	                        (rev 0)
+++ z3c.recipe.eggbasket/trunk/z3c/recipe/__init__.py	2008-05-05 12:48:43 UTC (rev 86446)
@@ -0,0 +1,6 @@
+# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
+try:
+    __import__('pkg_resources').declare_namespace(__name__)
+except ImportError:
+    from pkgutil import extend_path
+    __path__ = extend_path(__path__, __name__)


Property changes on: z3c.recipe.eggbasket/trunk/z3c/recipe/__init__.py
___________________________________________________________________
Name: svn:eol-style
   + native

Added: z3c.recipe.eggbasket/trunk/z3c/recipe/eggbasket/README.txt
===================================================================
--- z3c.recipe.eggbasket/trunk/z3c/recipe/eggbasket/README.txt	                        (rev 0)
+++ z3c.recipe.eggbasket/trunk/z3c/recipe/eggbasket/README.txt	2008-05-05 12:48:43 UTC (rev 86446)
@@ -0,0 +1,59 @@
+Supported options
+=================
+
+The recipe supports the following options:
+
+.. Note to recipe author!
+   ----------------------
+   For each option the recipe uses you shoud include a description
+   about the purpose of the option, the format and semantics of the
+   values it accepts, whether it is mandatory or optional and what the
+   default value is if it is omitted.
+
+option1
+    Description for ``option1``...
+
+option2
+    Description for ``option2``...
+
+
+Example usage
+=============
+
+.. Note to recipe author!
+   ----------------------
+   zc.buildout provides a nice testing environment which makes it
+   relatively easy to write doctests that both demonstrate the use of
+   the recipe and test it.
+   You can find examples of recipe doctests from the PyPI, e.g.
+   
+     http://pypi.python.org/pypi/zc.recipe.egg
+
+   The PyPI page for zc.buildout contains documentation about the test
+   environment.
+
+     http://pypi.python.org/pypi/zc.buildout#testing-support
+
+   Below is a skeleton doctest that you can start with when building
+   your own tests.
+
+We'll start by creating a buildout that uses the recipe::
+
+    >>> write('buildout.cfg',
+    ... """
+    ... [buildout]
+    ... parts = test1
+    ...
+    ... [test1]
+    ... recipe = z3c.recipe.eggbasket
+    ... option1 = %(foo)s
+    ... option2 = %(bar)s
+    ... """ % { 'foo' : 'value1', 'bar' : 'value2'})
+
+Running the buildout gives us::
+
+    >>> print system(buildout)
+    Installing test1.
+    Unused options for test1: 'option2' 'option1'.
+
+


Property changes on: z3c.recipe.eggbasket/trunk/z3c/recipe/eggbasket/README.txt
___________________________________________________________________
Name: svn:eol-style
   + native

Added: z3c.recipe.eggbasket/trunk/z3c/recipe/eggbasket/__init__.py
===================================================================
--- z3c.recipe.eggbasket/trunk/z3c/recipe/eggbasket/__init__.py	                        (rev 0)
+++ z3c.recipe.eggbasket/trunk/z3c/recipe/eggbasket/__init__.py	2008-05-05 12:48:43 UTC (rev 86446)
@@ -0,0 +1,22 @@
+# -*- coding: utf-8 -*-
+"""Recipe eggbasket"""
+
+from zc.buildout import UserError
+
+class Recipe(object):
+    """zc.buildout recipe"""
+
+    def __init__(self, buildout, name, options):
+        self.buildout, self.name, self.options = buildout, name, options
+
+    def install(self):
+        """Installer"""
+        # XXX Implement recipe functionality here
+        
+        # Return files that were created by the recipe. The buildout
+        # will remove all returned files upon reinstall.
+        return tuple()
+
+    def update(self):
+        """Updater"""
+        pass


Property changes on: z3c.recipe.eggbasket/trunk/z3c/recipe/eggbasket/__init__.py
___________________________________________________________________
Name: svn:eol-style
   + native

Added: z3c.recipe.eggbasket/trunk/z3c/recipe/eggbasket/tests/__init__.py
===================================================================
--- z3c.recipe.eggbasket/trunk/z3c/recipe/eggbasket/tests/__init__.py	                        (rev 0)
+++ z3c.recipe.eggbasket/trunk/z3c/recipe/eggbasket/tests/__init__.py	2008-05-05 12:48:43 UTC (rev 86446)
@@ -0,0 +1 @@
+# package


Property changes on: z3c.recipe.eggbasket/trunk/z3c/recipe/eggbasket/tests/__init__.py
___________________________________________________________________
Name: svn:eol-style
   + native

Added: z3c.recipe.eggbasket/trunk/z3c/recipe/eggbasket/tests/test_docs.py
===================================================================
--- z3c.recipe.eggbasket/trunk/z3c/recipe/eggbasket/tests/test_docs.py	                        (rev 0)
+++ z3c.recipe.eggbasket/trunk/z3c/recipe/eggbasket/tests/test_docs.py	2008-05-05 12:48:43 UTC (rev 86446)
@@ -0,0 +1,47 @@
+# -*- coding: utf-8 -*-
+"""
+Doctest runner for 'z3c.recipe.eggbasket'.
+"""
+__docformat__ = 'restructuredtext'
+
+import unittest
+import zc.buildout.tests
+import zc.buildout.testing
+
+from zope.testing import doctest, renormalizing
+
+optionflags =  (doctest.ELLIPSIS |
+                doctest.NORMALIZE_WHITESPACE |
+                doctest.REPORT_ONLY_FIRST_FAILURE)
+
+def setUp(test):
+    zc.buildout.testing.buildoutSetUp(test)
+
+    # Install the recipe in develop mode
+    zc.buildout.testing.install_develop('z3c.recipe.eggbasket', test)
+
+    # Install any other recipes that should be available in the tests
+    #zc.buildout.testing.install('collective.recipe.foobar', test)
+
+def test_suite():
+    suite = unittest.TestSuite((
+            doctest.DocFileSuite(
+                '../README.txt',
+                setUp=setUp,
+                tearDown=zc.buildout.testing.buildoutTearDown,
+                optionflags=optionflags,
+                checker=renormalizing.RENormalizing([
+                        # If want to clean up the doctest output you
+                        # can register additional regexp normalizers
+                        # here. The format is a two-tuple with the RE
+                        # as the first item and the replacement as the
+                        # second item, e.g.
+                        # (re.compile('my-[rR]eg[eE]ps'), 'my-regexps')
+                        zc.buildout.testing.normalize_path,
+                        ]),
+                ),
+            ))
+    return suite
+
+if __name__ == '__main__':
+    unittest.main(defaultTest='test_suite')


Property changes on: z3c.recipe.eggbasket/trunk/z3c/recipe/eggbasket/tests/test_docs.py
___________________________________________________________________
Name: svn:eol-style
   + native



More information about the Checkins mailing list