[PATCH] configure: use cffi.FFI().verify() to test buildability of CFFI bindings
David Bremner
david at tethera.net
Tue Jun 9 04:07:28 PDT 2020
Tomi Ollila <tomi.ollila at iki.fi> writes:
> Checking existence of pyconfig.h to determine whether CFFI-based
> notmuch bindings are buildable is not enough; for example Fedora 32
> ships pyconfig.h in python3-libs package, but python3-devel is required
> to be installed for the bindings to build.
>
> Executing cffi.FFI().verify() is pretty close to what is done in
> bindings/python-cffi/notmuch2/_build.py to get the c code part of the
> bindings built.
For me (debian 10, python 3.8.3) this leaves __pycache__ in the top
directory. This is particularly unfortunate when configure is invoked by
"make clean"; I know, who runs clean first, except all debian packages
;).
I tried adding a call to "cffi.verifier.cleanup_tmpdir()" per the cffi
docs, but there seems to be a nested __pycache__ directory that is not
cleaned up by that (or is created later). I guess the best option is
just to rm -rf __pycache__ at the appropriate point in configure?
More information about the notmuch
mailing list