--HG-- rename : lang/python/fpacking.py => lang/python/wiredtiger/fpacking.py rename : lang/python/intpack-test.py => lang/python/wiredtiger/intpack-test.py rename : lang/python/intpacking.py => lang/python/wiredtiger/intpacking.py rename : lang/python/packing-test.py => lang/python/wiredtiger/packing-test.py rename : lang/python/packing.py => lang/python/wiredtiger/packing.py
41 lines
1.1 KiB
Python
41 lines
1.1 KiB
Python
#!/usr/bin/env python
|
|
#
|
|
# Copyright (c) 2008-2013 WiredTiger, Inc.
|
|
# All rights reserved.
|
|
#
|
|
# See the file LICENSE for redistribution information.
|
|
|
|
import re, os, sys
|
|
from distutils.core import setup, Extension
|
|
|
|
# OS X hack: turn off the Universal binary support that is built into the
|
|
# Python build machinery, just build for the default CPU architecture.
|
|
if not 'ARCHFLAGS' in os.environ:
|
|
os.environ['ARCHFLAGS'] = ''
|
|
|
|
# Suppress warnings building SWIG generated code
|
|
extra_cflags = [
|
|
'-w',
|
|
]
|
|
|
|
dir = os.path.dirname(__file__)
|
|
|
|
# Read the version information from the RELEASE file
|
|
for l in open(os.path.join(dir, '..', '..', '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=['../../.libs'],
|
|
libraries=['wiredtiger'],
|
|
extra_compile_args=extra_cflags,
|
|
)],
|
|
package_dir={'' : dir},
|
|
packages=['wiredtiger'],
|
|
)
|