diff options
author | Alex Gorrod <alexg@wiredtiger.com> | 2014-09-19 15:39:05 +1000 |
---|---|---|
committer | Alex Gorrod <alexg@wiredtiger.com> | 2014-09-19 15:39:05 +1000 |
commit | 89bbfdfd4e48891c87ba06f4a61b3b4971e28580 (patch) | |
tree | 623dc9cc55502171a9a1034c42df53e4938f9d85 /lang | |
parent | 8d3c299864a2ebc436c1a5fa3b9de17a054a4b33 (diff) | |
parent | 8a5cd12bcb643c38cd391f590393598e4e972614 (diff) | |
download | mongo-89bbfdfd4e48891c87ba06f4a61b3b4971e28580.tar.gz |
Merge branch 'develop' into json-load
Diffstat (limited to 'lang')
-rw-r--r-- | lang/python/Makefile.am | 18 | ||||
-rw-r--r-- | lang/python/setup.py | 10 |
2 files changed, 14 insertions, 14 deletions
diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am index 0ac56138e29..03c65a57028 100644 --- a/lang/python/Makefile.am +++ b/lang/python/Makefile.am @@ -1,5 +1,5 @@ PYSRC = $(top_srcdir)/lang/python -PY_INCLUDE_DIRS = $(top_srcdir) +PYDIRS = -t $(abs_builddir) -I $(abs_top_srcdir):$(abs_top_builddir) -L $(abs_top_builddir)/.libs all-local: _wiredtiger.so # We keep generated Python sources under lang/python: that's where they live @@ -10,15 +10,19 @@ $(PYSRC)/wiredtiger_wrap.c: $(top_srcdir)/src/include/wiredtiger.in $(PYSRC)/wir mv wiredtiger.py wiredtiger/__init__.py) _wiredtiger.so: $(top_builddir)/libwiredtiger.la $(PYSRC)/wiredtiger_wrap.c - $(PYTHON) $(PYSRC)/setup.py build_ext -b . -t . -f -I $(PY_INCLUDE_DIRS) + (cd $(PYSRC) && \ + $(PYTHON) setup.py build_ext -f -b $(abs_builddir) $(PYDIRS)) install-exec-local: - $(PYTHON) $(PYSRC)/setup.py build_py -d build - $(PYTHON) $(PYSRC)/setup.py build_ext -b build -t . -f -I $(PY_INCLUDE_DIRS) - $(PYTHON) $(PYSRC)/setup.py install_lib -b build --skip-build $(PYTHON_INSTALL_ARG) + (cd $(PYSRC) && \ + $(PYTHON) setup.py build_py -d $(abs_builddir)/build && \ + $(PYTHON) setup.py build_ext -f -b $(abs_builddir)/build $(PYDIRS) && \ + $(PYTHON) setup.py install_lib -b $(abs_builddir)/build --skip-build $(PYTHON_INSTALL_ARG)) +# We build in different places for an install vs running from the tree: +# clean up both. Don't rely on "setup.py clean" -- everything that should +# be removed is created under the build directory. clean-local: - $(PYTHON) $(PYSRC)/setup.py clean - rm -rf _wiredtiger.so WT_TEST build wiredtiger + rm -rf build _wiredtiger.so wiredtiger_wrap.o WT_TEST TESTS = run-ex_access diff --git a/lang/python/setup.py b/lang/python/setup.py index 1c6ebc71387..1057006ce50 100644 --- a/lang/python/setup.py +++ b/lang/python/setup.py @@ -35,9 +35,7 @@ if not 'ARCHFLAGS' in os.environ: os.environ['ARCHFLAGS'] = '' # Suppress warnings building SWIG generated code -extra_cflags = [ - '-w', -] +extra_cflags = [ '-w' ] dir = os.path.dirname(__file__) @@ -50,12 +48,10 @@ 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'], + [os.path.join(dir, 'wiredtiger_wrap.c')], libraries=['wiredtiger'], extra_compile_args=extra_cflags, )], - package_dir={'' : dir}, + package_dir={'' : dir}, packages=['wiredtiger'], ) |