Skip to content

relocatable.py test: check that pkg-config gives paths inside the moved tree - #47

Open
itamaro wants to merge 1 commit into
python:mainfrom
itamaro:pkg-config-check
Open

itamaro wants to merge 1 commit into
python:mainfrom
itamaro:pkg-config-check

Conversation

@itamaro

@itamaro itamaro commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Adds a developer.pkg-config check. It queries --cflags and --libs for the installed python-*.pc files, with the moved tree's lib/pkgconfig on PKG_CONFIG_PATH (which is what Meson does), and requires the -I and -L directories to be inside the moved tree and Python.h to be there. It's skipped when pkg-config isn't installed.

It fails on CPython main, since the .pc files have an absolute prefix.

I ran it on Linux against main (fails) and against main with the relative-prefix change applied (passes).

Written with assistance from Claude Fable 5.2

…oved tree

`developer.pkg-config` queries `--cflags` and `--libs` for the installed
python-*.pc files, with the moved tree's pkgconfig directory on
PKG_CONFIG_PATH as Meson does. It fails on CPython main, where the files
have an absolute prefix; the failure also says whether `--define-prefix`
would have given the right paths. It is skipped without pkg-config.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@itamaro
itamaro marked this pull request as ready for review November 14, 2026 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant