You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
LDLIBRARY is set to libpython3.9a although no static lib is included in mambaforge for Linux #565
1. Return `.so` when `-static` isn't installed.
2. Return `.a` when `-static` is installed
Do we want the above?
I don't think so. I mean, you don't want packages to be switching between shared and static libpython based on whether libpython-static happens to be installed or not.
Pretty much all distros (checked Arch, Debian, Gentoo and openSUSE right now) have LDLIBRARY pointing to .so. I think this is a reasonable default, given that 1) you generally want to prefer dynamic linking, and 2) it is always installed.
FWICS Python defaults to using the shared library in _sysconfigdata_* if --enable-shared is passed. What I don't really know is whether there's a specific reason we're installing the data from the static build rather than the shared build. I'm building the packages locally to check the diff now.
Looks like most of the differences are superficial (build paths, build-time details), but some of the differences suggest that we're probably wrong to be using this data:
Activity
isuruf commentedon Mar 25, 2022
You need to install
libpython-staticpackage.maxnoe commentedon Mar 25, 2022
@isuruf I don't want to have the static lib. This is about that the python package has the wrong sysconfig variable in the metadata.
sysconfig.get_config_var("LDLIBRARY")should point to an existing file, in this case thelibpython3.9.sohmaarrfk commentedon Apr 24, 2022
For what its worth, it also affects 3.10.
We might to patch something here
https://github.com/python/cpython/blob/39a54ba63850e081a4a5551a773df5b4d5b1d3cd/Lib/sysconfig.py#L628
hmaarrfk commentedon Apr 24, 2022
I'm not sure if this is something that we can work with upstream on.
I'm not really sure what the correct behavior is:
.sowhen-staticisn't installed..awhen-staticis installedDo we want the above?
mgorny commentedon Jan 15, 2026
I don't think so. I mean, you don't want packages to be switching between shared and static libpython based on whether
libpython-statichappens to be installed or not.Pretty much all distros (checked Arch, Debian, Gentoo and openSUSE right now) have
LDLIBRARYpointing to.so. I think this is a reasonable default, given that 1) you generally want to prefer dynamic linking, and 2) it is always installed.FWICS Python defaults to using the shared library in
_sysconfigdata_*if--enable-sharedis passed. What I don't really know is whether there's a specific reason we're installing the data from the static build rather than the shared build. I'm building the packages locally to check the diff now.mgorny commentedon Jan 15, 2026
Looks like most of the differences are superficial (build paths, build-time details), but some of the differences suggest that we're probably wrong to be using this data:
Use sysconfigdata from shared library build
Use sysconfigdata from shared library build
chore(recipe): drop non-cf comments on libpython split