relocatable-python
relocatable-python copied to clipboard
`pip` install from a `venv` ends up with unrelocated `-I` flags when rebuilding wheels
Seen in this build:
clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -I/opt/glr/vtk/vtk-ci-ext/0/venv/include -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11
The -I/Library/Frameworks needs relocated.
This probably requires smarter logic in…something. Not sure if CPython, pip, or setuptools needs to get smarter or not.
A grep of my repackage of the relocatable install shows Python.framework/Versions/3.11/lib/python3.11/_sysconfigdata__darwin_darwin.py having hardcoded paths :/ . Other paths with hardcodings that may be relevant:
Python.framework/Versions/3.11/lib/python3.11/config-3.11-darwin/python-config.pyPython.framework/Versions/3.11/lib/python3.11/config-3.11-darwin/MakefilePython.framework/Versions/3.11/lib/pkgconfig/python-3.11.pcPython.framework/Versions/3.11/lib/pkgconfig/python-3.11-embed.pc
as well as various Tcl/Tk bits. The .pc files could probably just use $prefix detection instead of forcing things. The rest…all seems Darwin-specific and probably too hard to change while being as "reliable" as it is today. I guess we'll just have to wait for 3.11 wheels to be provided by others for our CI to be happy (our code uses CMake which skips all of this hard-coded stuff, so we've just been skating by).