-
-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make the installed pkg-config files relocatable (astral-sh/uv#11028) #507
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
That was fast, thanks! I think |
cd79e7c
to
e5d83b0
Compare
a2bd20b
to
e5d83b0
Compare
Ah, thanks, did not notice the script already did that :) |
This ensures that e.g. `PKG_CONFIG_PATH=/wherever/python/lib/pkgconfig pkg-config --cflags` gets you existent paths in /wherever/python instead of nonexistent paths in /install.
e5d83b0
to
0349133
Compare
zanieb
approved these changes
Jan 30, 2025
geofft
added a commit
to geofft/uv
that referenced
this pull request
Feb 6, 2025
Previously, we patched pkg-config .pc files to have the absolute path to the directory where we unpack a python-build-standalone release. As discussed in astral-sh#11028, we can use ${pcfiledir} in a .pc file to indicate paths relative to the location of the file itself. This change was implemented in astral-sh/python-build-standalone#507, so for newer python-build-standalone releases, we don't need to do any patching. Optimize this case by only modifying the .pc file if an actual change is needed (which might be helpful down the line with hard links or something). For older releases, change uv's patch to match what python-build-standalone now does.
geofft
added a commit
to geofft/uv
that referenced
this pull request
Feb 6, 2025
Previously, we patched pkg-config .pc files to have the absolute path to the directory where we unpack a python-build-standalone release. As discussed in astral-sh#11028, we can use ${pcfiledir} in a .pc file to indicate paths relative to the location of the file itself. This change was implemented in astral-sh/python-build-standalone#507, so for newer python-build-standalone releases, we don't need to do any patching. Optimize this case by only modifying the .pc file if an actual change is needed (which might be helpful down the line with hard links or something). For older releases, change uv's patch to match what python-build-standalone now does.
zanieb
pushed a commit
to astral-sh/uv
that referenced
this pull request
Feb 7, 2025
Previously, we patched pkg-config .pc files to have the absolute path to the directory where we unpack a python-build-standalone release. As discussed in #11028, we can use ${pcfiledir} in a .pc file to indicate paths relative to the location of the file itself. This change was implemented in astral-sh/python-build-standalone#507, so for newer python-build-standalone releases, we don't need to do any patching. Optimize this case by only modifying the .pc file if an actual change is needed (which might be helpful down the line with hard links or something). For older releases, change uv's patch to match what python-build-standalone now does.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
platform:darwin
Specific to the macOS platform
platform:linux
Specific to the Linux platform
python:3.13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This ensures that e.g.
PKG_CONFIG_PATH=/wherever/python/lib/pkgconfig pkg-config --cflags
gets you existent paths in /wherever/python instead of nonexistent paths in /install.