FindPythonLibs and pypy

I’m somewhat out of my depth here, but trying to get a auto-generated conda PR to work with pypy.

Our CMakeLists.txt uses simply


but this fails on the find PythonLibs. Checking with (command line) find I get


anyone any suggestions for handling pypy (portably?)

I suggest using the new find_package(Python) (or Python3 if you don’t need 2). That probably behaves better with other implementations.

thanks Ben. I haven’t tried yet, but I had quick a look at the FindPython.cmake and FindPython/Support.cmake source and can’t find any mention of pypy. Although I guess that doesn’t mean it won’t work of course… Anyone any experience with that?

pypy is not yet supported but you can specify manually the library by setting variable Python3_LIBRARY before calling find_package(Python3 ...). Note the support of input variables was introduced in v3.16.