From a3ad307d6a98f42a061eefd8e939a2833635d9ea Mon Sep 17 00:00:00 2001 From: BJ Dierkes Date: Sun, 6 Dec 2009 16:53:12 -0600 Subject: [PATCH] adding tempita to requires --- TODO | 1 + cement/paste/commands.py | 12 +++++----- .../etc/+package+/+package+.conf_tmpl | 22 +++++++++++++------ .../etc/+package+/plugins.d/example.plugin | 8 +++---- etc/plugins.d/example.plugin | 10 ++++----- setup.py | 5 ++++- 6 files changed, 36 insertions(+), 22 deletions(-) diff --git a/TODO b/TODO index 6f0d0dcf..c93e45c5 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,4 @@ ability to define hooks ability to register hooks from plugins documentation +nose tests \ No newline at end of file diff --git a/cement/paste/commands.py b/cement/paste/commands.py index ab7a89a7..d8fe9036 100644 --- a/cement/paste/commands.py +++ b/cement/paste/commands.py @@ -8,15 +8,15 @@ Create a new project named helloworld with this command: Create a new plugin for the helloworld project with this command: - $ paster cement-app helloworld -p myplugin - + $ paster cement-plugin helloworld myplugin + Usage: .. parsed-literal:: paster cement-app [--version][-h|--help] - [-p PLUGIN][--dry-run][-t|--templates *TEMPLATES*] + [--dry-run][-t|--templates *TEMPLATES*] .. container:: paster-usage @@ -31,7 +31,7 @@ Usage: """ -# taken mostly from tg.devtools +# Taken mostly from tg.devtools... Thank you! import sys, os import re @@ -138,7 +138,7 @@ class CementPluginCommand(command.Command): Example usage:: - $ paster cement-plugin yourproject + $ paster cement-plugin yourproject yourplugin """ version = pkg_resources.get_distribution('cement').version summary = __doc__.splitlines()[0] @@ -147,6 +147,8 @@ Example usage:: group_name = "Cement" dry_run = False templates = "cementplugin" + project = None + plugin = None parser = command.Command.standard_parser(quiet=True) parser = optparse.OptionParser( diff --git a/cement/paste/templates/cementapp/etc/+package+/+package+.conf_tmpl b/cement/paste/templates/cementapp/etc/+package+/+package+.conf_tmpl index 05e16b92..7416792a 100644 --- a/cement/paste/templates/cementapp/etc/+package+/+package+.conf_tmpl +++ b/cement/paste/templates/cementapp/etc/+package+/+package+.conf_tmpl @@ -8,16 +8,24 @@ # toggle debug output... can be true, false, yes, no, 1, 0 debug = false -# add any config options you'd like here -myoption = this is my option +# list of plugin names to load (comma separated). +enabled_plugins = clibasic, + +# these should probably be changed for production installations if you +# follow the FHS (and you should). +datadir = ./var/lib/{{package}}/data +tmpdir = ./var/lib/{{package}}/tmp +log_file = ./var/lib/{{package}}/log/{{package}}.log +plugin_config_dir = ./etc/{{package}}/plugins.d +plugin_dir = ./var/lib/{{package}}/plugins.d -# list of plugin names to load (comma separated). Note that the 'simple' -# plugin is from within CementExample directly (be it a core plugin if you -# will). The 'example' plugin comes from the CementExamplePlugin and is -# an external 3rd party plugin. -enabled_plugins = clibasic, example, # this is just a cosmetic option... whether to show 'loading plugin...' # on application startup. # # show_plugin_load = true + + +# add any config options you'd like here +# +# myoption = this is my option \ No newline at end of file diff --git a/cement/paste/templates/cementapp/etc/+package+/plugins.d/example.plugin b/cement/paste/templates/cementapp/etc/+package+/plugins.d/example.plugin index 43d71037..0fefd866 100644 --- a/cement/paste/templates/cementapp/etc/+package+/plugins.d/example.plugin +++ b/cement/paste/templates/cementapp/etc/+package+/plugins.d/example.plugin @@ -5,10 +5,10 @@ # config['plugins']['example']['param'] = value # # -# Please not that core cement plugins can be loaded from an application -# using the Cement framework. That said, the example.plugin configuration -# file needs to go under the plugins.d configuration directory of the -# application, not under cement itself. +# Please note that core cement plugins can be loaded from any application +# using the Cement framework. That said, plugin configuration files needs to +# go under the plugins.d configuration directory of the application, not under +# cement itself. debug = false param1 = value1 diff --git a/etc/plugins.d/example.plugin b/etc/plugins.d/example.plugin index 43d71037..12513712 100644 --- a/etc/plugins.d/example.plugin +++ b/etc/plugins.d/example.plugin @@ -5,10 +5,10 @@ # config['plugins']['example']['param'] = value # # -# Please not that core cement plugins can be loaded from an application -# using the Cement framework. That said, the example.plugin configuration -# file needs to go under the plugins.d configuration directory of the -# application, not under cement itself. +# Please note that core cement plugins can be loaded from any application +# using the Cement framework. That said, plugin configuration files needs to +# go under the plugins.d configuration directory of the application, not under +# cement itself. debug = false param1 = value1 @@ -21,4 +21,4 @@ param3 = yes param4 = 0 # equates to ['my', 'list', 'of', 'values'] -param5 = my, list, of, values, \ No newline at end of file +param5 = my, \ No newline at end of file diff --git a/setup.py b/setup.py index bc8af490..5bd4d9e6 100644 --- a/setup.py +++ b/setup.py @@ -37,7 +37,10 @@ setup(name='Cement', include_package_data=True, zip_safe=False, install_requires=[ - "ConfigObj" + "ConfigObj", + # Only required if you want to use paster + "PasteScript", + "tempita", ], entry_points=""" [paste.global_paster_command]