[New-bugs-announce] [issue43103] Add configure option to disable build libpython.a and don't install python.o

STINNER Victor report at bugs.python.org
Tue Feb 2 10:23:47 EST 2021

New submission from STINNER Victor <vstinner at python.org>:

Currently, "make install" copies Programs/python.o to $prefix/lib/python3.10/config-3.10-x86_64-linux-gnu/: see bpo-42307. This file is only useful to build a static Python executable with libpython3.10.a.

libpython3.10.a is also copied to $prefix/lib/python3.10/config-3.10-x86_64-linux-gnu/.

Most users don't build a static Python executable, so I propose to no longer build "static Python" by default and add --with-static-python option to the configure script.


Fedora has a downstream patch to not build libpythonX.Y.a for 11 years:

It is needed to respect the Fedora packaging guideline. The patch was introduced in Fedora to fix "python : does not adhere to Static Library Packaging Guideline" issue:


The package is in need of an update because it does not adhere to
the guidelines for packaging static libraries:


The -devel package contains both the shared and the static build of
a library. That makes it possible to link statically with the -devel
package as a build requirement instead of having to build-require a
special-purpose -static subpackage.

Correct would be to either disable/delete the static libraries at
build-time, or to %exclude them in the %files section, or to split off
a -static subpackage (if there is a compelling reason as why the static
libs should be made available).

Please consult the guidelines for the details.


    /usr/lib/python2.6/config/libpython2.6.so  <=>  /usr/lib/python2.6/config/libpython2.6.a

components: Build
messages: 386149
nosy: vstinner
priority: normal
severity: normal
status: open
title: Add configure option to disable build libpython.a and don't install python.o
versions: Python 3.10

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list