Skip to content

Commit 608cfb8

Browse files
[3.13] gh-119729: Use 't' in pkg-config file name for free-threaded build (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 <[email protected]>
1 parent 5a037b7 commit 608cfb8

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

Doc/whatsnew/3.13.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2169,6 +2169,10 @@ Build Changes
21692169
The bundled mimalloc has custom changes, see :gh:`113141` for details.
21702170
(Contributed by Dino Viehland in :gh:`109914`.)
21712171

2172+
* On POSIX systems, the pkg-config (``.pc``) filenames now include the ABI
2173+
flags. For example, the free-threaded build generates ``python-3.13t.pc``
2174+
and the debug build generates ``python-3.13d.pc``.
2175+
21722176

21732177
Porting to Python 3.13
21742178
======================

Makefile.pre.in

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ LINKCC= @LINKCC@
4040
AR= @AR@
4141
READELF= @READELF@
4242
SOABI= @SOABI@
43+
ABIFLAGS= @ABIFLAGS@
4344
LDVERSION= @LDVERSION@
4445
MODULE_LDFLAGS=@MODULE_LDFLAGS@
4546
GITVERSION= @GITVERSION@
@@ -150,7 +151,6 @@ INCLUDEDIR= @includedir@
150151
CONFINCLUDEDIR= $(exec_prefix)/include
151152
PLATLIBDIR= @PLATLIBDIR@
152153
SCRIPTDIR= $(prefix)/$(PLATLIBDIR)
153-
ABIFLAGS= @ABIFLAGS@
154154
# executable name for shebangs
155155
EXENAME= $(BINDIR)/python$(LDVERSION)$(EXE)
156156
# Variable used by ensurepip
@@ -2261,10 +2261,10 @@ bininstall: commoninstall altbininstall
22612261
-if test "$(VERSION)" != "$(LDVERSION)"; then \
22622262
rm -f $(DESTDIR)$(BINDIR)/python$(VERSION)-config; \
22632263
(cd $(DESTDIR)$(BINDIR); $(LN) -s python$(LDVERSION)-config python$(VERSION)-config); \
2264-
rm -f $(DESTDIR)$(LIBPC)/python-$(LDVERSION).pc; \
2265-
(cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python-$(LDVERSION).pc); \
2266-
rm -f $(DESTDIR)$(LIBPC)/python-$(LDVERSION)-embed.pc; \
2267-
(cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION)-embed.pc python-$(LDVERSION)-embed.pc); \
2264+
rm -f $(DESTDIR)$(LIBPC)/python-$(VERSION).pc; \
2265+
(cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(LDVERSION).pc python-$(VERSION).pc); \
2266+
rm -f $(DESTDIR)$(LIBPC)/python-$(VERSION)-embed.pc; \
2267+
(cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(LDVERSION)-embed.pc python-$(VERSION)-embed.pc); \
22682268
fi
22692269
-rm -f $(DESTDIR)$(BINDIR)/python3-config
22702270
(cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python3-config)
@@ -2701,8 +2701,8 @@ libainstall: all scripts
27012701
$(INSTALL_DATA) Modules/Setup.bootstrap $(DESTDIR)$(LIBPL)/Setup.bootstrap
27022702
$(INSTALL_DATA) Modules/Setup.stdlib $(DESTDIR)$(LIBPL)/Setup.stdlib
27032703
$(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local
2704-
$(INSTALL_DATA) Misc/python.pc $(DESTDIR)$(LIBPC)/python-$(VERSION).pc
2705-
$(INSTALL_DATA) Misc/python-embed.pc $(DESTDIR)$(LIBPC)/python-$(VERSION)-embed.pc
2704+
$(INSTALL_DATA) Misc/python.pc $(DESTDIR)$(LIBPC)/python-$(LDVERSION).pc
2705+
$(INSTALL_DATA) Misc/python-embed.pc $(DESTDIR)$(LIBPC)/python-$(LDVERSION)-embed.pc
27062706
$(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makesetup
27072707
$(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
27082708
$(INSTALL_SCRIPT) python-config.py $(DESTDIR)$(LIBPL)/python-config.py
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
On POSIX systems, the pkg-config (``.pc``) filenames now include the ABI
2+
flags, which may include debug ("d") and free-threaded ("t"). For example:
3+
* ``python-3.14.pc`` (default, non-debug build)
4+
* ``python-3.14d.pc`` (default, debug build)
5+
* ``python-3.14t.pc`` (free-threaded build)

0 commit comments

Comments
 (0)