moving example plugin to external ./plugins

This commit is contained in:
BJ Dierkes 2009-12-09 18:26:50 -06:00
parent 7d7c2aa0d7
commit 28661a4476
8 changed files with 51 additions and 7 deletions

View File

@ -173,15 +173,15 @@ Example usage::
self.__dict__.update(self.options.__dict__)
if self.args:
self.project = self.args[0]
self.plugin = self.args[1]
self.project = self.args[0].lower()
self.plugin = self.args[1].lower()
while not self.project:
self.project = raw_input("Enter project name: ")
self.project = raw_input("Enter project name: ").lower()
while not self.plugin:
self.plugin = raw_input("Enter plugin name: ")
self.plugin = raw_input("Enter plugin name: ").lower()
package = "%s-plugins-%s" % (self.project.lower(), self.plugin.lower())
package = "%s-plugins-%s" % (self.project, self.plugin)
package = beginning_letter.sub("", package)
package = valid_only.sub("_", package)
if package:

View File

@ -15,7 +15,7 @@ myoption = this is my option
# 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,
enabled_plugins = clibasic, example,
# this is just a cosmetic option... whether to show 'loading plugin...'
# on application startup.

View File

@ -0,0 +1 @@
__import__('pkg_resources').declare_namespace(__name__)

View File

@ -0,0 +1 @@
__import__('pkg_resources').declare_namespace(__name__)

View File

@ -0,0 +1,15 @@
[example]
# This is a cement plugin configuration file. Once parsed, the
# values from here will be accessible from:
#
# config['plugins']['example']['param'] = value
#
param1 = value1
param2 = value two
# true/false equate to True/False in python
param3 = true
# equates to ['my', 'list', 'of', 'values']
param5 = my, list, of, values,

View File

@ -0,0 +1,27 @@
from setuptools import setup, find_packages
import sys, os
setup(name='CementExamplePlugin',
version='0.1',
description='Example Plugin for Applications Built on Cement',
classifiers=[],
keywords='',
author='BJ Dierkes',
author_email='wdierkes@5dollarwhitebox.org',
url='http://github.com/derks/cement',
license='GNU GPLv3',
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
include_package_data=True,
zip_safe=False,
install_requires=[
"ConfigObj",
"Cement",
],
setup_requires=[
"PasteScript >= 1.7"
],
test_suite='nose.collector',
entry_points="""
""",
namespace_packages=['cement', 'cement.plugins'],
)

View File

@ -23,7 +23,7 @@ using cement.
"""
setup(name='cement',
setup(name='Cement',
version=version,
description="Python CLI Application Framework",
long_description=LONG,