Details
Description
Hi,
First of all, I'd like to signal that I'm cross-issuing this to manylinux and scikit-build because I'm not sure who is the responsible here.
I'm trying to build a python binding to a Qt-based C++ software. After a lot of search, I chose pyside2/scikit-build on the manylinux_2_24 docker image. I document this adventure here: https://github.com/aymara/lima/issues/123 .
I was able to build locally a shiboken2/pyside2-based LIMA binding using scikit-build (https://scikit-build.readthedocs.io/en/latest/). I'm now trying to build it in a manylinux_2_24 based docker container. Unfortunately, building pyside inside the container fails at:
```
RUN python3.8 setup.py bdist_wheel
```
With:
```
Inserting path '/opt/_internal/cpython-3.8.12/bin' to environment
error: Failed to locate the Python library with /opt/_internal/cpython-3.8.12/lib/x86_64-linux-gnu/libpython3.8.so, /opt/_internal/cpython-3.8.12/lib/x86_64-linux-gnu/libpython3.8.so.1, /opt/_internal/cpython-3.8.12/lib/x86_64-linux-gnu/libpython3.8.so.1.0, /opt/_internal/cpython-3.8.12/lib/x86_64-linux-gnu/libpython3.8.a
Traceback (most recent call last):
File "setup.py", line 296, in <module>
setup_runner.run_setup()
File "/pyside-setup/build_scripts/setup_runner.py", line 168, in run_setup
raise RuntimeError(msg)
RuntimeError:
setup.py invocation failed with exit code: 1.
setup.py invocation was: /usr/local/bin/python3.8 setup.py install --cmake=/usr/local/bin/cmake --build-type=all --internal-build-type=shiboken2
```
It seems that one cannot have a libpython inside a wheel and/or the manylinux container, by design (https://github.com/pypa/manylinux/issues/255). Because python extension should not link against libpython.
I'm now a little bit lost. I don't know what to search now. I wonder if I should try to remove the reference to libpython from the pyside build system but I don't what would be the consequences.