2012-07-30 16:32:42 +10:00
|
|
|
#!/usr/bin/env python
|
2012-02-02 11:25:36 +00:00
|
|
|
#
|
2014-01-07 10:30:12 -05:00
|
|
|
# Public Domain 2008-2014 WiredTiger, Inc.
|
|
|
|
|
#
|
|
|
|
|
# This is free and unencumbered software released into the public domain.
|
|
|
|
|
#
|
|
|
|
|
# Anyone is free to copy, modify, publish, use, compile, sell, or
|
|
|
|
|
# distribute this software, either in source code form or as a compiled
|
|
|
|
|
# binary, for any purpose, commercial or non-commercial, and by any
|
|
|
|
|
# means.
|
|
|
|
|
#
|
|
|
|
|
# In jurisdictions that recognize copyright laws, the author or authors
|
|
|
|
|
# of this software dedicate any and all copyright interest in the
|
|
|
|
|
# software to the public domain. We make this dedication for the benefit
|
|
|
|
|
# of the public at large and to the detriment of our heirs and
|
|
|
|
|
# successors. We intend this dedication to be an overt act of
|
|
|
|
|
# relinquishment in perpetuity of all present and future rights to this
|
|
|
|
|
# software under copyright law.
|
|
|
|
|
#
|
|
|
|
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
|
|
|
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
|
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
|
|
|
# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
|
|
|
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
|
|
|
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
|
|
|
# OTHER DEALINGS IN THE SOFTWARE.
|
2012-02-02 11:25:36 +00:00
|
|
|
#
|
|
|
|
|
|
2012-07-30 16:32:42 +10:00
|
|
|
import re, os, sys
|
2011-03-10 22:17:48 +11:00
|
|
|
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:
|
2012-07-30 16:32:42 +10:00
|
|
|
os.environ['ARCHFLAGS'] = ''
|
|
|
|
|
|
2012-12-10 23:08:06 +11:00
|
|
|
# Suppress warnings building SWIG generated code
|
|
|
|
|
extra_cflags = [
|
2013-05-08 16:28:35 +10:00
|
|
|
'-w',
|
2012-12-10 23:08:06 +11:00
|
|
|
]
|
2011-04-26 17:24:21 +10:00
|
|
|
|
|
|
|
|
dir = os.path.dirname(__file__)
|
2011-03-10 22:17:48 +11:00
|
|
|
|
2012-08-02 14:23:03 +10:00
|
|
|
# Read the version information from the RELEASE file
|
2013-07-17 10:13:11 +10:00
|
|
|
for l in open(os.path.join(dir, '..', '..', 'RELEASE')):
|
2012-07-30 16:32:42 +10:00
|
|
|
if re.match(r'WIREDTIGER_VERSION_(?:MAJOR|MINOR|PATCH)=', l):
|
|
|
|
|
exec(l)
|
2011-08-26 15:28:43 +10:00
|
|
|
|
|
|
|
|
wt_ver = '%d.%d' % (WIREDTIGER_VERSION_MAJOR, WIREDTIGER_VERSION_MINOR)
|
|
|
|
|
|
|
|
|
|
setup(name='wiredtiger', version=wt_ver,
|
2011-04-26 17:34:23 +10:00
|
|
|
ext_modules=[Extension('_wiredtiger',
|
2013-07-17 10:13:11 +10:00
|
|
|
[os.path.join(dir, 'wiredtiger_wrap.c')],
|
2012-07-30 16:32:42 +10:00
|
|
|
include_dirs=['../..'],
|
|
|
|
|
library_dirs=['../../.libs'],
|
|
|
|
|
libraries=['wiredtiger'],
|
|
|
|
|
extra_compile_args=extra_cflags,
|
|
|
|
|
)],
|
2013-07-17 10:13:11 +10:00
|
|
|
package_dir={'' : dir},
|
|
|
|
|
packages=['wiredtiger'],
|
2011-03-10 22:17:48 +11:00
|
|
|
)
|