Skip to content
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

gh-119729: Use 't' in pkg-config file name for free-threaded build #119738

Merged
merged 2 commits into from
May 30, 2024

Conversation

colesbury
Copy link
Contributor

@colesbury colesbury commented May 29, 2024

For example, the free-threaded build now generates lib/pkgconfig/python-3.13t.pc.

For example, the free-threaded build now generates
`lib/pkgconfig/python-3.13t.pc`.
@@ -40,6 +40,7 @@ LINKCC= @LINKCC@
AR= @AR@
READELF= @READELF@
SOABI= @SOABI@
ABIFLAGS= @ABIFLAGS@
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LDVERSION is defined as $(VERSION)$(ABIFLAGS), so it's important to define ABIFLAGS first

@colesbury
Copy link
Contributor Author

I figured it would be good to start with a narrow change:

  • LDVERSION depends on ABIFLAGS, so move up the definition
  • Make the .pc symlinks behave like our other installed symlinks where the real file has the most specific version information (i.e., python-3.13t.pc).

I think we'll want to consider doing more, such as only installing python3.13t for the free-threaded build instead of also the symlink python3.13 -> python3.13t.

@@ -0,0 +1,3 @@
On POSIX systems, the pkg-config (``.pc``) files now include the ABI flags.
For example, the free-threaded build generates ``python-3.14t.pc`` and the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also changes the debug one to have a "d" as well no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. Do you think that's problematic or should I just update the NEWS to make that more clear?

For context, we already do that for things like the include directories, which look like include/python3.14td for the free-threaded debug builds.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just update the news entry because that's the only change that affects normal builds (maybe even mentioning it in the what's new).

@colesbury colesbury merged commit 1c04c63 into python:main May 30, 2024
33 checks passed
@miss-islington-app
Copy link

Thanks @colesbury for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@colesbury colesbury deleted the gh-119729-pkgconfig branch May 30, 2024 17:48
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 30, 2024
…ild (pythonGH-119738)

For example, the free-threaded build now generates
`lib/pkgconfig/python-3.13t.pc` and the debug build generates
`lib/pkgconfig/python-3.13d.pc`.
(cherry picked from commit 1c04c63)

Co-authored-by: Sam Gross <colesbury@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented May 30, 2024

GH-119797 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label May 30, 2024
colesbury added a commit that referenced this pull request May 30, 2024
…uild (GH-119738) (#119797)

For example, the free-threaded build now generates
`lib/pkgconfig/python-3.13t.pc` and the debug build generates
`lib/pkgconfig/python-3.13d.pc`.
(cherry picked from commit 1c04c63)

Co-authored-by: Sam Gross <colesbury@gmail.com>
noahbkim pushed a commit to hudson-trading/cpython that referenced this pull request Jul 11, 2024
…ild (python#119738)

For example, the free-threaded build now generates
`lib/pkgconfig/python-3.13t.pc` and the debug build generates
`lib/pkgconfig/python-3.13d.pc`.
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
…ild (python#119738)

For example, the free-threaded build now generates
`lib/pkgconfig/python-3.13t.pc` and the debug build generates
`lib/pkgconfig/python-3.13d.pc`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants