Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Here’s the relevant source: https://github.com/python/cpython/blob/8dd2766d99f8f51ad62dc...
I believe you should just be able to replace the library name with an absolute path to the library, and remove the need for the lookup at all?
Conceptually, Cython is mainly for accelerating Python code, and can _also_ access C code. Meanwhile CFFI is specifically for calling C code and nothing else. I recommend the video for the differences.
One concrete thing that pops to my mind is that Cython doesn't support Py_LIMITED_API which means that you need to ship a lot more binary wheels. At least the issue is still open (https://github.com/cython/cython/issues/2542) and Cython projects IME need new wheels for each minor Python release. Compare that to cffi projects that (musl & pypy aside) only have to ship wheels for one Python version / architecture: https://pypi.org/project/argon2-cffi-bindings/#files
The underlying problem (as is often the case) is using references/names (like /bin/sh) without defining them.
FYI the GNU Make in Nixpkgs doesn't have this problem, since it patches the reference https://github.com/NixOS/nixpkgs/blob/nixos-22.11/pkgs/devel...