diff options
| author | David Bremner <bremner@debian.org> | 2011-12-16 16:46:20 -0400 |
|---|---|---|
| committer | David Bremner <bremner@debian.org> | 2011-12-16 16:46:20 -0400 |
| commit | 90259bf961eeacb89dfd2e73526a931e530cabd8 (patch) | |
| tree | c8c5d57ebba3f82e372e8d2670257ac01d68fca4 /bindings/python/setup.py | |
| parent | 8c0cb84ecce40ded56f9c551b2ef791caa9be7cf (diff) | |
| parent | 07bb8b9e895541006eca88430925f1c6524c4708 (diff) | |
Merge commit 'debian/0.10.2-1' into squeeze-backports
Conflicts:
debian/changelog
Diffstat (limited to 'bindings/python/setup.py')
| -rw-r--r-- | bindings/python/setup.py | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/bindings/python/setup.py b/bindings/python/setup.py index 1497bc43..286fd196 100644 --- a/bindings/python/setup.py +++ b/bindings/python/setup.py @@ -4,18 +4,11 @@ import os import re from distutils.core import setup -def get_version(): - file = open('notmuch/__init__.py') - try: - for line in file: - if re.match('__VERSION__\s*=\s*',line) != None: - version = line.split('=', 1)[1] - return eval(version, {}, {}) - finally: - file.close() - raise IOError('Unexpected end-of-file') - -__VERSION__=get_version() +# get the notmuch version number without importing the notmuch module +version_file = os.path.join(os.path.dirname(os.path.abspath(__file__)), + 'notmuch', 'version.py') +execfile(version_file) +assert __VERSION__, 'Failed to read the notmuch binding version number' setup(name='notmuch', version=__VERSION__, @@ -53,12 +46,11 @@ left of cnotmuch then. Requirements ------------ -You need to have notmuch installed (or rather libnotmuch.so.1). The -release version 0.3 should work fine. Also, notmuch makes use of the -ctypes library, and has only been tested with python 2.5. It will not -work on earlier python versions. +You need to have notmuch installed (or rather libnotmuch.so.1). Also, +notmuch makes use of the ctypes library, and has only been tested with +python >= 2.5. It will not work on earlier python versions. """, - classifiers=['Development Status :: 2 - Pre-Alpha', + classifiers=['Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: GNU General Public License (GPL)', 'Programming Language :: Python :: 2', |
