FindPython PyPy: Python_SOABI not defined or erroneous
For PyPy, the extension is incorrect (Python_add_library(WITH_SOABI)
, I expect Python_SOABI
too).
For PyPy2, the extension produced is ext.so
. But it should be ext.pypy-73.so
, PyPy intentionally ignores "plain" so's so as not to pick up CPython extensions. (that's one that I've verified works, though maybe one with a "pp" would work too?)
For PyPy3, the extension is ext.pypy36-pp73.so
, but ext.pypy36-pp73-x86_64-linux-gnu.so
is the correct extension.
(Broken on Linux & macOS, probably Windows too)
print(sysconfig.get_config_var('SO'));
worked for PyPy in the past, by the way. I believe PyPy support was new for FindPython in CMake 3.18.
Edited by Marc Chevrier