diff options
Diffstat (limited to 'lang/python')
-rw-r--r-- | lang/python/setup.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lang/python/setup.py b/lang/python/setup.py index 5786c404faa..eaa3ee1330a 100644 --- a/lang/python/setup.py +++ b/lang/python/setup.py @@ -1,4 +1,4 @@ -import os +import re, os from distutils.core import setup, Extension # OS X hack: turn off the Universal binary support that is built into the @@ -8,11 +8,19 @@ if not 'ARCHFLAGS' in os.environ: dir = os.path.dirname(__file__) -setup(name='wiredtiger', version='1.0', +# Read the version information from dist/RELEASE +dist = os.path.join(os.path.dirname(os.path.dirname(dir)), 'dist') +for l in open(os.path.join(dist, 'RELEASE')): + if re.match(r'WIREDTIGER_VERSION_(?:MAJOR|MINOR|PATCH)=', l): + exec(l) + +wt_ver = '%d.%d' % (WIREDTIGER_VERSION_MAJOR, WIREDTIGER_VERSION_MINOR) + +setup(name='wiredtiger', version=wt_ver, ext_modules=[Extension('_wiredtiger', [os.path.join(dir, 'wiredtiger_wrap.c')], include_dirs=['.'], - library_dirs=['.'], + library_dirs=['.libs'], libraries=['wiredtiger'], )], py_modules=['wiredtiger'], |