From 2ace5d315193de9bca0e8a5a79119b09a7b7aef0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Mon, 2 Mar 2026 19:20:32 +0000 Subject: [PATCH] GH-145274: drop build_prefix check from missing stdlib warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe LaĆ­ns --- Makefile.pre.in | 2 +- Modules/getpath.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.pre.in b/Makefile.pre.in index da8d5483fd32e8..120a6add38507f 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -1004,7 +1004,7 @@ platform: $(PYTHON_FOR_BUILD_DEPS) pybuilddir.txt # or removed in case of failure. pybuilddir.txt: $(PYTHON_FOR_BUILD_DEPS) @echo "none" > ./pybuilddir.txt - $(RUNSHARED) $(PYTHON_FOR_BUILD) -S -m sysconfig --generate-posix-vars ;\ + $(RUNSHARED) $(PYTHON_FOR_BUILD) -S -X pathconfig_warnings=0 -m sysconfig --generate-posix-vars ;\ if test $$? -ne 0 ; then \ echo "generate-posix-vars failed" ; \ rm -f ./pybuilddir.txt ; \ diff --git a/Modules/getpath.py b/Modules/getpath.py index e06297b7b63a7b..20e050787700bf 100644 --- a/Modules/getpath.py +++ b/Modules/getpath.py @@ -779,7 +779,7 @@ def search_up(prefix, *landmarks, test=isfile): if not stdlib_dir or not isdir(stdlib_dir): hint = home_hint if home else f'sys.prefix is set to {prefix}, is this correct?' warn('WARN: Could not find the standard library directory! ' + hint) - elif (not platstdlib_dir and not build_prefix) or not isdir(platstdlib_dir): + elif not platstdlib_dir or not isdir(platstdlib_dir): hint = home_hint if home else f'sys.exec_prefix is set to {exec_prefix}, is this correct?' warn('WARN: Could not find the platform standard library directory! ' + hint)