gregneagle / relocatable-python

A tool for building standalone relocatable Python.framework bundles
Apache License 2.0
156 stars 42 forks source link

`pip` install from a `venv` ends up with unrelocated `-I` flags when rebuilding wheels #29

Open mathstuf opened 2 years ago

mathstuf commented 2 years ago

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.

mathstuf commented 2 years ago

This probably requires smarter logic in…something. Not sure if CPython, pip, or setuptools needs to get smarter or not.

mathstuf commented 2 years ago

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:

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).