hercules-team / python-augeas

Python bindings for Augeas
GNU Lesser General Public License v2.1
44 stars 31 forks source link

Using cffi in in-line vs out-of-line ABI mode #48

Closed jefferyto closed 3 years ago

jefferyto commented 4 years ago

I'm helping someone packaging python-augeas for OpenWrt (openwrt/packages#12913).

I noticed that you are using the Setuptools integration, which is for out-of-line ABI (or out-of-line API) mode, where a builder script (e.g. foo_build.py) is called during install to produce an output file (_foo.py), and it is the output file that is imported during run-time.

However, you are importing the builder file during run-time instead of the output file, which is in-line ABI mode (see the first bullet point after the table of contents).

I can open a PR to fix this, but I would like to ask if you have a preference on which mode to use. Out-of-line is faster to import during run-time though I'm not sure how big of a difference it will be for this library.

thedrow commented 4 years ago

Feel free to try to fix this.