Provide additional meta information
Signed-off-by: martin f. krafft <madduck@madduck.net>
diff --git a/reclass/main.py b/reclass/main.py
index cf846c7..406dc24 100644
--- a/reclass/main.py
+++ b/reclass/main.py
@@ -6,8 +6,7 @@
# Copyright © 2007–13 martin f. krafft <madduck@madduck.net>
# Released under the terms of the Artistic Licence 2.0
#
-from version import __name__, __description__ , __version__, \
- __author__, __copyright__, __licence__
+from version import *
import sys, os, posix
import reclass.config
@@ -23,15 +22,14 @@
def run():
config_file = None
for d in (os.getcwd(), os.path.dirname(sys.argv[0])):
- f = os.path.join(d, __name__ + '-config.yml')
+ f = os.path.join(d, RECLASS_NAME + '-config.yml')
if os.access(f, os.R_OK):
config_file = f
break
try:
defaults = { 'pretty_print' : True, 'output' : 'yaml' }
- options = reclass.config.get_options(__name__, __version__,
- __description__, config_file,
- defaults)
+ options = reclass.config.get_options(RECLASS_NAME, VERSION, DESCRIPTION,
+ config_file, defaults)
nodes_uri, classes_uri = reclass.config.path_mangler(options.inventory_base_uri,
options.nodes_uri,
options.classes_uri)
diff --git a/reclass/version.py b/reclass/version.py
index 7329eee..3a302d0 100644
--- a/reclass/version.py
+++ b/reclass/version.py
@@ -6,11 +6,11 @@
# Copyright © 2007–13 martin f. krafft <madduck@madduck.net>
# Released under the terms of the Artistic Licence 2.0
#
-__name__ = 'reclass'
-__description__ = 'classify nodes based on an external data source'
-__version__ = '1.0'
-__author__ = 'martin f. krafft <madduck@madduck.net>'
-__copyright__ = 'Copyright © 2007–13 ' + __author__
-__licence__ = 'Artistic Licence 2.0'
-
-__all__ = [__name__, __description__, __version__, __author__, __copyright__, __licence__]
+RECLASS_NAME = 'reclass'
+DESCRIPTION = 'classify nodes based on an external data source'
+VERSION = '1.0'
+AUTHOR = 'martin f. krafft'
+AUTHOR_EMAIL = 'reclass@pobox.madduck.net'
+COPYRIGHT = 'Copyright © 2007–13 ' + AUTHOR
+LICENCE = 'Artistic Licence 2.0'
+URL = 'https://github.com/madduck/reclass'
diff --git a/setup.py b/setup.py
index a9eecc2..68901f3 100644
--- a/setup.py
+++ b/setup.py
@@ -6,12 +6,19 @@
# Copyright © 2007–13 martin f. krafft <madduck@madduck.net>
# Released under the terms of the Artistic Licence 2.0
#
+
+from reclass.version import *
from setuptools import setup, find_packages
-from reclass.version import __name__, __version__
+
setup(
- name = __name__,
- version = __version__,
- packages = find_packages(),
+ name = RECLASS_NAME,
+ description = DESCRIPTION,
+ version = VERSION,
+ author = AUTHOR,
+ author_email = AUTHOR_EMAIL,
+ license = LICENCE,
+ url = URL,
+ packages = find_packages(),
entry_points = {
'console_scripts': ['reclass = reclass.main:run' ],
},