summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2012-04-06 17:39:14 +0200
committerFlorent Xicluna <florent.xicluna@gmail.com>2012-04-06 17:39:14 +0200
commit3df8635fedb722cad1d0587d7b87d79969030a62 (patch)
tree99b046b8b0ca0fb06461fd42a3846c879937f805 /setup.py
parentc8c2b738a3721b58a74554eb260619c9a7560b8e (diff)
downloadpep8-3df8635fedb722cad1d0587d7b87d79969030a62.tar.gz
Release version 1.0.11.0.1
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py30
1 files changed, 23 insertions, 7 deletions
diff --git a/setup.py b/setup.py
index 881ce0b..cdf137c 100644
--- a/setup.py
+++ b/setup.py
@@ -1,16 +1,32 @@
from setuptools import setup, find_packages
-version = '1.0'
-long_description = '\n\n'.join([open('README.rst').read(),
- open('CHANGES.txt').read(),
-# open('TODO.txt').read(),
- ])
+
+def get_version():
+ f = open('pep8.py')
+ try:
+ for line in f:
+ if line.startswith('__version__'):
+ return eval(line.split('=')[-1])
+ finally:
+ f.close()
+
+
+def get_long_description():
+ descr = []
+ for fname in 'README.rst', 'CHANGES.txt': # , 'TODO.txt'
+ f = open(fname)
+ try:
+ descr.append(f.read())
+ finally:
+ f.close()
+ return '\n\n'.join(descr)
+
setup(
name='pep8',
- version=version,
+ version=get_version(),
description="Python style guide checker",
- long_description=long_description,
+ long_description=get_long_description(),
keywords='pep8',
author='Johann C. Rocholl',
author_email='johann@rocholl.net',