From 14eafdd1de3cda99b13d80b6ced44e061724ed42 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Wed, 16 Nov 2022 21:41:13 +0000 Subject: [PATCH] gh-99370: Prefer LIBDIR from sysconfig when locating libpython for test (GH-99523) (cherry picked from commit 7c57857340befcb90394bc347c904ca62049b684) Co-authored-by: Steve Dower --- Lib/test/test_venv.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_venv.py b/Lib/test/test_venv.py index 9e23cdf8f2be23..86ce60fef13975 100644 --- a/Lib/test/test_venv.py +++ b/Lib/test/test_venv.py @@ -594,7 +594,9 @@ def test_zippath_from_non_installed_posix(self): # For python built with shared enabled. We need to set # LD_LIBRARY_PATH so the non-installed python can find and link # libpython.so - ld_library_path = os.path.abspath(os.path.dirname(sys.executable)) + ld_library_path = sysconfig.get_config_var("LIBDIR") + if not ld_library_path or sysconfig.is_python_build(): + ld_library_path = os.path.abspath(os.path.dirname(sys.executable)) if sys.platform == 'darwin': ld_library_path_env = "DYLD_LIBRARY_PATH" else: pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy