bpo-43103: Add configure --without-static-libpython (GH-24418)

Add a new configure --without-static-libpython option to not build
the libpythonMAJOR.MINOR.a static library and not install the
python.o object file.

Fix smelly.py and stable_abi.py tools when libpython3.10.a is
missing.
This commit is contained in:
Victor Stinner 2021-02-17 11:14:42 +01:00 committed by GitHub
parent 6a4177516b
commit 801bb0b503
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 113 additions and 25 deletions

View file

@ -136,11 +136,14 @@ def check_extensions():
def main():
nsymbol = 0
# static library
LIBRARY = sysconfig.get_config_var('LIBRARY')
if not LIBRARY:
raise Exception("failed to get LIBRARY variable from sysconfig")
nsymbol = check_library(LIBRARY)
if os.path.exists(LIBRARY):
nsymbol += check_library(LIBRARY)
# dynamic library
LDLIBRARY = sysconfig.get_config_var('LDLIBRARY')