From: Daniel Kahn Gillmor Date: Fri, 22 May 2020 01:03:59 +0000 (-0400) Subject: python-cffi: enable out-of-tree builds X-Git-Tag: archive/debian/0.30_rc0-1~10 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=ef0ab496b3f1e3a85f08102e3aaf251f4af69fd3 python-cffi: enable out-of-tree builds This is a simple hack to enable out-of-tree builds, a concern raised by Tomi in id:m24kzjib9a.fsf@guru.guru-group.fi This change at least enables "make check" to complete without error, but I'm sure it could be improved. I am not expert enough in setuptools to know how. Signed-off-by: Daniel Kahn Gillmor Amended by db per id:87d06usa31.fsf@powell.devork.be --- diff --git a/configure b/configure index 9f910b12..32a836bb 100755 --- a/configure +++ b/configure @@ -70,6 +70,14 @@ if [ "$srcdir" != "." ]; then mkdir bindings/ruby cp -a "$srcdir"/bindings/ruby/*.[ch] bindings/ruby cp -a "$srcdir"/bindings/ruby/extconf.rb bindings/ruby + + # Use the same hack to replicate python-cffi source for + # out-of-tree builds (again, not ideal). + mkdir bindings/python-cffi + cp -a "$srcdir"/bindings/python-cffi/tests \ + "$srcdir"/bindings/python-cffi/notmuch2 \ + "$srcdir"/bindings/python-cffi/setup.py \ + bindings/python-cffi/ fi # Set several defaults (optionally specified by the user in diff --git a/test/T391-python-cffi.sh b/test/T391-python-cffi.sh index e4f80dc6..f961069b 100755 --- a/test/T391-python-cffi.sh +++ b/test/T391-python-cffi.sh @@ -8,7 +8,7 @@ fi test_begin_subtest "python cffi tests" -pytest_dir=$NOTMUCH_SRCDIR/bindings/python-cffi/build/stage +pytest_dir=$NOTMUCH_BUILDDIR/bindings/python-cffi/build/stage printf "[pytest]\nminversion = 3.0\naddopts = -ra\n" > $pytest_dir/pytest.ini test_expect_success "(cd $pytest_dir && ${NOTMUCH_PYTHON} -m pytest --log-file=$TMP_DIRECTORY/test.output)" test_done