PEP 739 `build-details.json` point at nonexistent `libpython.static` for `--enable-shared` and framework builds · Issue #159759 · python/cpython · GitHub
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:
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.
Activity
gh-159759: Fix libpython.static in PEP 739 build-details.json (#159766)
[3.14] gh-159759: Fix libpython.static in PEP 739 build-details.json (G…
[3.15] gh-159759: Fix libpython.static in PEP 739 build-details.json (G…