mirror of
https://github.com/datafolklabs/cement.git
synced 2026-02-06 15:46:47 +00:00
moving example plugin to external ./plugins
This commit is contained in:
parent
7d7c2aa0d7
commit
28661a4476
@ -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:
|
||||
|
||||
@ -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.
|
||||
|
||||
1
plugins/cement-plugins-example/cement/__init__.py
Normal file
1
plugins/cement-plugins-example/cement/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
__import__('pkg_resources').declare_namespace(__name__)
|
||||
@ -0,0 +1 @@
|
||||
__import__('pkg_resources').declare_namespace(__name__)
|
||||
@ -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,
|
||||
27
plugins/cement-plugins-example/setup.py
Normal file
27
plugins/cement-plugins-example/setup.py
Normal 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'],
|
||||
)
|
||||
Loading…
Reference in New Issue
Block a user