diff options
author | grabner <pjg.github@ubergrabner.net> | 2014-04-15 21:53:00 -0400 |
---|---|---|
committer | grabner <pjg.github@ubergrabner.net> | 2014-04-15 21:53:00 -0400 |
commit | 0ba70364a2d8189682b9e4dc5d23519da040d109 (patch) | |
tree | 952a7003160068b75cb98232ea754709f5b0b267 | |
parent | ba2298358ce4de151668cfe6540de9aa6b184b6d (diff) | |
download | iniherit-0ba70364a2d8189682b9e4dc5d23519da040d109.tar.gz |
extricated version into separate file
-rw-r--r-- | VERSION.txt | 1 | ||||
-rwxr-xr-x | setup.py | 15 |
2 files changed, 8 insertions, 8 deletions
diff --git a/VERSION.txt b/VERSION.txt new file mode 100644 index 0000000..1180819 --- /dev/null +++ b/VERSION.txt @@ -0,0 +1 @@ +0.1.7 @@ -11,14 +11,13 @@ import os, sys, setuptools from setuptools import setup # require python 2.7+ -assert(sys.version_info[0] > 2 - or sys.version_info[0] == 2 - and sys.version_info[1] >= 7) +if sys.hexversion < 0x02070000: + raise RuntimeError('This package requires python 2.7 or better') -here = os.path.abspath(os.path.dirname(__file__)) -def read(*parts): - try: return open(os.path.join(here, *parts)).read() - except: return '' +heredir = os.path.abspath(os.path.dirname(__file__)) +def read(*parts, **kw): + try: return open(os.path.join(heredir, *parts)).read() + except: return kw.get('default', '') test_requires = [ 'nose >= 1.2.1', @@ -48,7 +47,7 @@ classifiers = [ setup( name = 'iniherit', - version = '0.1.7', + version = read('VERSION.txt', default='0.0.1').strip(), description = 'A ConfigParser subclass with file-specified inheritance.', long_description = read('README.rst'), classifiers = classifiers, |