[Checkins] SVN: Sandbox/ulif/z3c.recipe.template/ Add basic package files.

Uli Fouquet uli at gnufix.de
Fri Mar 6 09:40:35 EST 2009


Log message for revision 97580:
  Add basic package files.

Changed:
  A   Sandbox/ulif/z3c.recipe.template/CHANGES.txt
  A   Sandbox/ulif/z3c.recipe.template/README.txt
  A   Sandbox/ulif/z3c.recipe.template/setup.py

-=-
Added: Sandbox/ulif/z3c.recipe.template/CHANGES.txt
===================================================================
--- Sandbox/ulif/z3c.recipe.template/CHANGES.txt	                        (rev 0)
+++ Sandbox/ulif/z3c.recipe.template/CHANGES.txt	2009-03-06 14:40:35 UTC (rev 97580)
@@ -0,0 +1,9 @@
+Changes
+*******
+
+0.1 (unreleased)
+================
+
+Initial build based on `collective.recipe.template`_
+
+.. _collective.recipe.template: http://pypi.python.org/pypi/collective.recipe.template

Added: Sandbox/ulif/z3c.recipe.template/README.txt
===================================================================
--- Sandbox/ulif/z3c.recipe.template/README.txt	                        (rev 0)
+++ Sandbox/ulif/z3c.recipe.template/README.txt	2009-03-06 14:40:35 UTC (rev 97580)
@@ -0,0 +1,50 @@
+Introduction
+************
+
+This recipe can be used to generate textfiles from a (text)
+template. Different to `collective.recipe.template`_ you can also
+specify a path to the output file and the path will be created, if it
+does not exist.
+
+A short example::
+
+  [buildout]
+  parts = zope.conf
+
+  [message]
+  recipe = collective.recipe.template
+  input = templates/message.in
+  output = ${buildout:parts-directory}/etc/message
+
+  mymessage = Hello, World!
+
+
+In the template you can use the exact same variables as you can use
+in the buildout configuration. For example an input file can look like this::
+
+  My top level directory is ${buildout:directory}
+  Executables are stored in ${buildout:bin-directory}
+
+
+As an extension to the buildout syntax you can reference variables from
+the current buildout part directly. For example::
+
+  My message is: ${mymessage}
+
+
+Why another template recipe?
+============================
+
+Both `iw.recipe.template`_ and `inquant.recipe.textfile`_ claim to do the
+same thing. I have found them to be undocumented and too buggy for real
+world use, and neither are in a public repository where I could fix them. In
+addition this implementation leverages the buildout variable substitution
+code, making it a lot simpler.
+
+`collective.recipe.template`_ actually lacks support for creating
+paths of target files to be generated (and tests).
+
+
+.. _iw.recipe.template: http://pypi.python.org/pypi/iw.recipe.template
+.. _inquant.recipe.textfile: http://pypi.python.org/pypi/inquant.recipe.textfile
+.. _collective.recipe.template: http://pypi.python.org/pypi/collective.recipe.template

Added: Sandbox/ulif/z3c.recipe.template/setup.py
===================================================================
--- Sandbox/ulif/z3c.recipe.template/setup.py	                        (rev 0)
+++ Sandbox/ulif/z3c.recipe.template/setup.py	2009-03-06 14:40:35 UTC (rev 97580)
@@ -0,0 +1,34 @@
+from setuptools import setup, find_packages
+import os
+
+version = '0.1dev'
+
+setup(name='z3c.recipe.template',
+      version=version,
+      description="Buildout recipe to generate a text file from a template",
+      long_description=open("README.txt").read() + "\n" +
+                       open("CHANGES.txt").read(),
+      classifiers=[
+        "Development Status :: 3 - Alpha",
+        "Framework :: Buildout",
+        "Programming Language :: Python",
+        "Topic :: Software Development :: Libraries :: Python Modules",
+        "License :: OSI Approved :: Zope Public License",
+        ],
+      keywords='template buildout zope',
+      author='Uli Fouquet based on work of Wichert Akkerman',
+      author_email='grok-dev at zope.org',
+      url='http://pypi.python.org/pypi/z3c.recipe.template',
+      license='ZPL 2.1',
+      packages=find_packages(exclude=['ez_setup']),
+      namespace_packages=['z3c', 'z3c.recipe' ],
+      include_package_data=True,
+      zip_safe=False,
+      install_requires=[
+          'setuptools',
+      ],
+      entry_points="""
+      [zc.buildout]
+      default = z3c.recipe.template:Recipe
+      """,
+      )



More information about the Checkins mailing list