relocatable-python icon indicating copy to clipboard operation
relocatable-python copied to clipboard

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

Open mathstuf opened this issue 3 years ago • 2 comments

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 avatar Oct 02 '22 01:10 mathstuf

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

mathstuf avatar Oct 02 '22 01:10 mathstuf

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.py
  • Python.framework/Versions/3.11/lib/python3.11/config-3.11-darwin/Makefile
  • Python.framework/Versions/3.11/lib/pkgconfig/python-3.11.pc
  • Python.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).

mathstuf avatar Oct 02 '22 01:10 mathstuf