jrl-umi3218 / jrl-cmakemodules

CMake utility toolbox
https://jrl-cmakemodules.readthedocs.io/en/master/
Other
57 stars 45 forks source link

python: Development might not be required #513

Closed nim65s closed 2 years ago

nim65s commented 2 years ago

Hi,

In many places, we need only the Python interpreter (and sometimes the include dirs), but libpythonX.Y.so is not necessary.

Building wheel packages allowing distribution on PyPI even explicitly forbids it (ref. PEP513). Therefore, it is not available on the manylinux distribution.

Building jrl-cmakemodules packages on that distribution is currently not working, because CMake consider the Development component not found when libpythonX.Y.so is not available.

So I think we need to remove that.

Maybe this is required in some other cases I didn't think about yet, so an opt-out option would be better than just this blunt removal. Any idea about that ?

nim65s commented 2 years ago

Ok, and would you include or exclude this Development component by default ?

jcarpent commented 2 years ago

We can exclude it or use a dedicated JRL_CMAKEMODULE_VAR to say that we are on a PyPi manylinux setup, or detect it automatically. I would go for the latest solution.

nim65s commented 2 years ago

Here is a solution that will allow for another PR to introduce a manylinux setup which will directly change the default of this ${PYTHON_COMPONENTS} variable