diff options
author | Victor Stinner <vstinner@python.org> | 2021-02-17 10:14:42 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-17 10:14:42 (GMT) |
commit | 801bb0b5035f8eeafe389dc082c02dfafaa07f6a (patch) | |
tree | fc0b6eac92d8d042c0cd0eab51b7240093005bed /Tools | |
parent | 6a4177516b4473bd0b5ed041d29db2af3d996b9d (diff) | |
download | cpython-801bb0b5035f8eeafe389dc082c02dfafaa07f6a.zip cpython-801bb0b5035f8eeafe389dc082c02dfafaa07f6a.tar.gz cpython-801bb0b5035f8eeafe389dc082c02dfafaa07f6a.tar.bz2 |
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.
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/scripts/smelly.py | 5 | ||||
-rwxr-xr-x | Tools/scripts/stable_abi.py | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/Tools/scripts/smelly.py b/Tools/scripts/smelly.py index e8a375c..fb01660 100755 --- a/Tools/scripts/smelly.py +++ b/Tools/scripts/smelly.py @@ -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') diff --git a/Tools/scripts/stable_abi.py b/Tools/scripts/stable_abi.py index 47547a9..117dfeb 100755 --- a/Tools/scripts/stable_abi.py +++ b/Tools/scripts/stable_abi.py @@ -2,8 +2,9 @@ import argparse import glob -import re +import os.path import pathlib +import re import subprocess import sys import sysconfig @@ -213,7 +214,8 @@ def check_symbols(parser_args): LIBRARY = sysconfig.get_config_var("LIBRARY") if not LIBRARY: raise Exception("failed to get LIBRARY variable from sysconfig") - check_library(parser_args.stable_abi_file, LIBRARY, abi_funcs) + if os.path.exists(LIBRARY): + check_library(parser_args.stable_abi_file, LIBRARY, abi_funcs) # dynamic library LDLIBRARY = sysconfig.get_config_var("LDLIBRARY") |