Skip to content

Commit

Permalink
[3.13] gh-119729: Use 't' in pkg-config file name for free-threaded b…
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
miss-islington and colesbury authored May 30, 2024
1 parent 5a037b7 commit 608cfb8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
4 changes: 4 additions & 0 deletions Doc/whatsnew/3.13.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2169,6 +2169,10 @@ Build Changes
The bundled mimalloc has custom changes, see :gh:`113141` for details.
(Contributed by Dino Viehland in :gh:`109914`.)

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


Porting to Python 3.13
======================
Expand Down
14 changes: 7 additions & 7 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ LINKCC= @LINKCC@
AR= @AR@
READELF= @READELF@
SOABI= @SOABI@
ABIFLAGS= @ABIFLAGS@
LDVERSION= @LDVERSION@
MODULE_LDFLAGS=@MODULE_LDFLAGS@
GITVERSION= @GITVERSION@
Expand Down Expand Up @@ -150,7 +151,6 @@ INCLUDEDIR= @includedir@
CONFINCLUDEDIR= $(exec_prefix)/include
PLATLIBDIR= @PLATLIBDIR@
SCRIPTDIR= $(prefix)/$(PLATLIBDIR)
ABIFLAGS= @ABIFLAGS@
# executable name for shebangs
EXENAME= $(BINDIR)/python$(LDVERSION)$(EXE)
# Variable used by ensurepip
Expand Down Expand Up @@ -2261,10 +2261,10 @@ bininstall: commoninstall altbininstall
-if test "$(VERSION)" != "$(LDVERSION)"; then \
rm -f $(DESTDIR)$(BINDIR)/python$(VERSION)-config; \
(cd $(DESTDIR)$(BINDIR); $(LN) -s python$(LDVERSION)-config python$(VERSION)-config); \
rm -f $(DESTDIR)$(LIBPC)/python-$(LDVERSION).pc; \
(cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python-$(LDVERSION).pc); \
rm -f $(DESTDIR)$(LIBPC)/python-$(LDVERSION)-embed.pc; \
(cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION)-embed.pc python-$(LDVERSION)-embed.pc); \
rm -f $(DESTDIR)$(LIBPC)/python-$(VERSION).pc; \
(cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(LDVERSION).pc python-$(VERSION).pc); \
rm -f $(DESTDIR)$(LIBPC)/python-$(VERSION)-embed.pc; \
(cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(LDVERSION)-embed.pc python-$(VERSION)-embed.pc); \
fi
-rm -f $(DESTDIR)$(BINDIR)/python3-config
(cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python3-config)
Expand Down Expand Up @@ -2701,8 +2701,8 @@ libainstall: all scripts
$(INSTALL_DATA) Modules/Setup.bootstrap $(DESTDIR)$(LIBPL)/Setup.bootstrap
$(INSTALL_DATA) Modules/Setup.stdlib $(DESTDIR)$(LIBPL)/Setup.stdlib
$(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local
$(INSTALL_DATA) Misc/python.pc $(DESTDIR)$(LIBPC)/python-$(VERSION).pc
$(INSTALL_DATA) Misc/python-embed.pc $(DESTDIR)$(LIBPC)/python-$(VERSION)-embed.pc
$(INSTALL_DATA) Misc/python.pc $(DESTDIR)$(LIBPC)/python-$(LDVERSION).pc
$(INSTALL_DATA) Misc/python-embed.pc $(DESTDIR)$(LIBPC)/python-$(LDVERSION)-embed.pc
$(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makesetup
$(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
$(INSTALL_SCRIPT) python-config.py $(DESTDIR)$(LIBPL)/python-config.py
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
On POSIX systems, the pkg-config (``.pc``) filenames now include the ABI
flags, which may include debug ("d") and free-threaded ("t"). For example:
* ``python-3.14.pc`` (default, non-debug build)
* ``python-3.14d.pc`` (default, debug build)
* ``python-3.14t.pc`` (free-threaded build)

0 comments on commit 608cfb8

Please sign in to comment.