Skip to content

PEP 739 build-details.json point at nonexistent libpython.static for --enable-shared and framework builds #159759

Closed

Description

@itamaro

Bug report

Tools/build/generate-build-details.py sets libpython.static to
os.path.join(LIBDIR, LIBRARY), but make install (libainstall) installs the
static library into LIBPL:

$(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY)

The archive is copied to LIBDIR when it is LDLIBRARY (static-only
builds, via altbininstall). with the default --enable-shared configuration:

./configure --prefix=/tmp/py --enable-shared && make -j && make install ENSUREPIP=no
/tmp/py/bin/python3 -c "import json; print(json.load(open('/tmp/py/lib/python3.16/build-details.json'))['libpython'])"
# {'dynamic': '/tmp/py/lib/libpython3.16.dylib', 'static': '/tmp/py/lib/libpython3.16.a', ...}
ls /tmp/py/lib/libpython3.16.a                                # No such file
ls /tmp/py/lib/python3.16/config-3.16-darwin/libpython3.16.a  # exists

Framework builds still have STATIC_LIBPYTHON=1, but libainstall skips the
archive ("use make frameworkinstall"), and frameworkinstallmaclib creates
LIBPL/libpython3.X.a as a symlink to the framework's shared library. The
static entry should be omitted there.

Found while looking into relocatable builds.

CPython versions tested on:

CPython main branch

Operating systems tested on:

macOS

Linked PRs

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    buildThe build process and cross-build
    on Oct 19, 2026
  2. added 3 commits that reference this issue on Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions