Skip to content

Commit 31390ee

Browse files
colesburyestyxx
authored andcommitted
pythongh-119729: Use 't' in pkg-config file name for free-threaded build (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`.
1 parent 23d4599 commit 31390ee

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
@@ -2181,6 +2181,10 @@ Build Changes
21812181
The bundled mimalloc has custom changes, see :gh:`113141` for details.
21822182
(Contributed by Dino Viehland in :gh:`109914`.)
21832183

2184+
* On POSIX systems, the pkg-config (``.pc``) filenames now include the ABI
2185+
flags. For example, the free-threaded build generates ``python-3.13t.pc``
2186+
and the debug build generates ``python-3.13d.pc``.
2187+
21842188

21852189
Porting to Python 3.13
21862190
======================

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
@@ -2262,10 +2262,10 @@ bininstall: commoninstall altbininstall
22622262
-if test "$(VERSION)" != "$(LDVERSION)"; then \
22632263
rm -f $(DESTDIR)$(BINDIR)/python$(VERSION)-config; \
22642264
(cd $(DESTDIR)$(BINDIR); $(LN) -s python$(LDVERSION)-config python$(VERSION)-config); \
2265-
rm -f $(DESTDIR)$(LIBPC)/python-$(LDVERSION).pc; \
2266-
(cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python-$(LDVERSION).pc); \
2267-
rm -f $(DESTDIR)$(LIBPC)/python-$(LDVERSION)-embed.pc; \
2268-
(cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION)-embed.pc python-$(LDVERSION)-embed.pc); \
2265+
rm -f $(DESTDIR)$(LIBPC)/python-$(VERSION).pc; \
2266+
(cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(LDVERSION).pc python-$(VERSION).pc); \
2267+
rm -f $(DESTDIR)$(LIBPC)/python-$(VERSION)-embed.pc; \
2268+
(cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(LDVERSION)-embed.pc python-$(VERSION)-embed.pc); \
22692269
fi
22702270
-rm -f $(DESTDIR)$(BINDIR)/python3-config
22712271
(cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python3-config)
@@ -2702,8 +2702,8 @@ libainstall: all scripts
27022702
$(INSTALL_DATA) Modules/Setup.bootstrap $(DESTDIR)$(LIBPL)/Setup.bootstrap
27032703
$(INSTALL_DATA) Modules/Setup.stdlib $(DESTDIR)$(LIBPL)/Setup.stdlib
27042704
$(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local
2705-
$(INSTALL_DATA) Misc/python.pc $(DESTDIR)$(LIBPC)/python-$(VERSION).pc
2706-
$(INSTALL_DATA) Misc/python-embed.pc $(DESTDIR)$(LIBPC)/python-$(VERSION)-embed.pc
2705+
$(INSTALL_DATA) Misc/python.pc $(DESTDIR)$(LIBPC)/python-$(LDVERSION).pc
2706+
$(INSTALL_DATA) Misc/python-embed.pc $(DESTDIR)$(LIBPC)/python-$(LDVERSION)-embed.pc
27072707
$(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makesetup
27082708
$(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
27092709
$(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)