[Checkins] SVN: Skeletons/ Rather than force myself to start fresh
with each "megrok" project
Brandon Rhodes
brandon at rhodesmill.org
Mon Oct 8 23:24:56 EDT 2007
Log message for revision 80731:
Rather than force myself to start fresh with each "megrok" project
that I start, and quite probably make mistakes when doing so (I note
that some such projects seem to be missing their "namespace package"
boilerplate __init__.py), I am committing this skeleton of a megrok
project that I can "svn copy" each time I want to start a project.
If the gods consider the top-level an inappropriate place for
"Skeletons", or even consider the whole scheme silly - though I myself
hope it will be used in the future for things even beyond "megrok" -
then please feel free to "svn mv" it somewhere more appropriate.
Changed:
A Skeletons/
A Skeletons/README.txt
A Skeletons/megrok/
A Skeletons/megrok/branches/
A Skeletons/megrok/tags/
A Skeletons/megrok/trunk/
A Skeletons/megrok/trunk/README.txt
A Skeletons/megrok/trunk/buildout.cfg
A Skeletons/megrok/trunk/setup.py
A Skeletons/megrok/trunk/src/
A Skeletons/megrok/trunk/src/megrok/
A Skeletons/megrok/trunk/src/megrok/__init__.py
-=-
Added: Skeletons/README.txt
===================================================================
--- Skeletons/README.txt (rev 0)
+++ Skeletons/README.txt 2007-10-09 03:24:55 UTC (rev 80731)
@@ -0,0 +1,19 @@
+
+=========
+Skeletons
+=========
+
+Each directory under ``Skeletons`` is a template
+for a different sort of Zope-related project.
+If you start your Zope project
+by making a Subversion copy of one of these templates
+using the ``svn cp`` command,
+you will not only avoid having to generate boilerplate yourself,
+but will very slightly reduce the size of the repository
+by letting your own files inherit history from the central copy
+in the skeleton.
+
+One skeleton is currently available:
+
+``megrok/``
+ Use this when creating a ``megrok.NAME`` Grok community project.
Added: Skeletons/megrok/trunk/README.txt
===================================================================
--- Skeletons/megrok/trunk/README.txt (rev 0)
+++ Skeletons/megrok/trunk/README.txt 2007-10-09 03:24:55 UTC (rev 80731)
@@ -0,0 +1,4 @@
+Once you have copied this template to your own ``megrok`` directory,
+replace the contents of this ``README.txt`` file with a description of
+your project. Also, place your project name in ``setup.py`` and in
+``buildout.cfg`` wherever you see the phrase ``PROJECT_NAME``.
Added: Skeletons/megrok/trunk/buildout.cfg
===================================================================
--- Skeletons/megrok/trunk/buildout.cfg (rev 0)
+++ Skeletons/megrok/trunk/buildout.cfg 2007-10-09 03:24:55 UTC (rev 80731)
@@ -0,0 +1,47 @@
+[buildout]
+develop = .
+parts = app data test
+find-links = http://download.zope.org/distribution/
+newest = false
+
+[app]
+recipe = zc.zope3recipes>=0.5.3:application
+eggs = megrok.PROJECT_NAME
+site.zcml = <include package="megrok.genshi" />
+ <include package="zope.app.twisted" />
+
+ <unauthenticatedPrincipal id="zope.anybody"
+ title="Unauthenticated User" />
+ <unauthenticatedGroup id="zope.Anybody"
+ title="Unauthenticated Users" />
+ <authenticatedGroup id="zope.Authenticated"
+ title="Authenticated Users" />
+ <everybodyGroup id="zope.Everybody"
+ title="All Users" />
+ <principal id="zope.manager"
+ title="Manager"
+ login="grok"
+ password_manager="Plain Text"
+ password="grok"
+ />
+
+ <!-- Replace the following directive if you do not want
+ public access -->
+ <grant permission="zope.View"
+ principal="zope.Anybody" />
+ <grant permission="zope.app.dublincore.view"
+ principal="zope.Anybody" />
+
+ <role id="zope.Manager" title="Site Manager" />
+ <role id="zope.Member" title="Site Member" />
+ <grantAll role="zope.Manager" />
+ <grant role="zope.Manager"
+ principal="zope.manager" />
+
+[data]
+recipe = zc.recipe.filestorage
+
+[test]
+recipe = zc.recipe.testrunner
+eggs = megrok.PROJECT_NAME
+defaults = ['--tests-pattern', '^f?tests$', '-v']
Added: Skeletons/megrok/trunk/setup.py
===================================================================
--- Skeletons/megrok/trunk/setup.py (rev 0)
+++ Skeletons/megrok/trunk/setup.py 2007-10-09 03:24:55 UTC (rev 80731)
@@ -0,0 +1,29 @@
+from setuptools import setup, find_packages
+
+version = '0.0'
+
+setup(name='megrok.PROJECT_NAME',
+ version=version,
+ description="",
+ long_description="""\
+""",
+ # Use classifiers that are already listed at:
+ # http://pypi.python.org/pypi?%3Aaction=list_classifiers
+ classifiers=[],
+ keywords="",
+ author="",
+ author_email="",
+ url="",
+ license="",
+ package_dir={'': 'src'},
+ packages=find_packages('src'),
+ include_package_data=True,
+ zip_safe=False,
+ install_requires=['setuptools',
+ 'grok',
+ # Add extra requirements here
+ ],
+ entry_points="""
+ # Add entry points here
+ """,
+ )
Added: Skeletons/megrok/trunk/src/megrok/__init__.py
===================================================================
--- Skeletons/megrok/trunk/src/megrok/__init__.py (rev 0)
+++ Skeletons/megrok/trunk/src/megrok/__init__.py 2007-10-09 03:24:55 UTC (rev 80731)
@@ -0,0 +1,6 @@
+# namespace package boilerplate
+try:
+ __import__('pkg_resources').declare_namespace(__name__)
+except ImportError, e:
+ from pkgutil import extend_path
+ __path__ = extend_path(__path__, __name__)
More information about the Checkins
mailing list