summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSpencer McIntyre <zeroSteiner@gmail.com>2018-05-23 22:27:14 -0400
committerSpencer McIntyre <zeroSteiner@gmail.com>2018-05-23 22:27:14 -0400
commitd3d37e8bf2f5caf7d325ffaae634d4e9e2dcd78a (patch)
tree386ee0431087a393a53a8758aa93d8b49f420280
parentf7e0b7d17538a10b1348f392380c565631921497 (diff)
downloadpluginbase-d3d37e8bf2f5caf7d325ffaae634d4e9e2dcd78a.tar.gz
Update setup.py and convert README to markdown
-rw-r--r--README27
-rw-r--r--README.md29
-rw-r--r--setup.py20
3 files changed, 45 insertions, 31 deletions
diff --git a/README b/README
deleted file mode 100644
index 86738b3..0000000
--- a/README
+++ /dev/null
@@ -1,27 +0,0 @@
-
- { pluginbase }
-
- PluginBase is a module for Python that enables the
- development of flexible plugin systems in Python.
-
- Step 1:
-
- from pluginbase import PluginBase
- plugin_base = PluginBase(package='yourapplication.plugins')
-
- Step 2:
-
- plugin_source = plugin_base.make_plugin_source(
- searchpath=['./path/to/plugins', './path/to/more/plugins'])
-
- Step 3:
-
- with plugin_source:
- from yourapplication.plugins import my_plugin
- my_plugin.do_something_cool()
-
- Or alternatively:
-
- my_plugin = plugin_source.load_plugin('my_plugin')
- my_plugin.do_something_cool()
-
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..4faeacd
--- /dev/null
+++ b/README.md
@@ -0,0 +1,29 @@
+# PluginBase
+
+PluginBase is a module for Python that enables the
+development of flexible plugin systems in Python.
+
+Step 1:
+```python
+from pluginbase import PluginBase
+plugin_base = PluginBase(package='yourapplication.plugins')
+```
+
+Step 2:
+```python
+plugin_source = plugin_base.make_plugin_source(
+ searchpath=['./path/to/plugins', './path/to/more/plugins'])
+```
+
+Step 3:
+```python
+with plugin_source:
+ from yourapplication.plugins import my_plugin
+my_plugin.do_something_cool()
+```
+
+Or alternatively:
+```python
+my_plugin = plugin_source.load_plugin('my_plugin')
+my_plugin.do_something_cool()
+```
diff --git a/setup.py b/setup.py
index 2b70c4f..e689052 100644
--- a/setup.py
+++ b/setup.py
@@ -1,8 +1,17 @@
-try:
- from setuptools import setup
-except ImportError:
- from distutils.core import setup
+import os
+import sys
+base_directory = os.path.dirname(__file__)
+
+from setuptools import setup
+
+DESCRIPTION = """
+PluginBase is a module for Python that enables the development of flexible \
+plugin systems in Python.\
+"""
+
+with(os.path.join(base_directory, 'README.md'), 'r') as file_h:
+ long_description = file_h.read()
setup(
name='pluginbase',
@@ -11,6 +20,9 @@ setup(
maintainer='Spencer McIntyre',
maintainer_email='zeroSteiner@gmail.com',
version='0.7-dev',
+ description=DESCRIPTION,
+ long_description=long_description,
+ long_description_content_type='text/markdown',
url='http://github.com/mitsuhiko/pluginbase',
py_modules=['pluginbase'],
description='A support library for building plugins sytems in Python.',