summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlec Thomas <alec@swapoff.org>2010-07-15 21:29:04 +1000
committerAlec Thomas <alec@swapoff.org>2010-07-15 21:29:04 +1000
commitbb672965bca4b5471f1604a11e5c3c2d346fc631 (patch)
treef4543beb967bac52e089b651d3536056bd5c37c9
parentfaa9ae8f193ae8db162282f914db82d9ea233b7d (diff)
downloadvoluptuous-bb672965bca4b5471f1604a11e5c3c2d346fc631.tar.gz
Add __version__ and __author__ support.
-rw-r--r--setup.py12
-rw-r--r--voluptuous.py4
2 files changed, 13 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index e110937..3bf6b71 100644
--- a/setup.py
+++ b/setup.py
@@ -3,14 +3,20 @@ try:
except ImportError:
from distutils.core import setup
+import sys
+sys.path.insert(0, '.')
+version = __import__('voluptuous').__version__
+long_description = open('README').read()
+description = long_description.splitlines()[0].strip()
+
setup(
name='voluptuous',
url='http://github.com/alecthomas/voluptuous',
download_url='http://pypi.python.org/pypi/voluptuous',
- version='0.1',
- description=open('README').readlines()[0],
- long_description=open('README').read(),
+ version=version,
+ description=description,
+ long_description=long_description,
license='BSD',
platforms=['any'],
py_modules=['voluptuous'],
diff --git a/voluptuous.py b/voluptuous.py
index aa02a71..4c8eea5 100644
--- a/voluptuous.py
+++ b/voluptuous.py
@@ -87,6 +87,10 @@ import re
import urlparse
+__author__ = 'Alec Thomas <alec@swapoff.org>'
+__version__ = '0.1'
+
+
class Error(Exception):
"""Base validation exception."""