Skip to content

Commit 7c57857

Browse files
authored
gh-99370: Prefer LIBDIR from sysconfig when locating libpython for test (GH-99523)
1 parent 51d1035 commit 7c57857

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Lib/test/test_venv.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,9 @@ def test_zippath_from_non_installed_posix(self):
594594
# For python built with shared enabled. We need to set
595595
# LD_LIBRARY_PATH so the non-installed python can find and link
596596
# libpython.so
597-
ld_library_path = os.path.abspath(os.path.dirname(sys.executable))
597+
ld_library_path = sysconfig.get_config_var("LIBDIR")
598+
if not ld_library_path or sysconfig.is_python_build():
599+
ld_library_path = os.path.abspath(os.path.dirname(sys.executable))
598600
if sys.platform == 'darwin':
599601
ld_library_path_env = "DYLD_LIBRARY_PATH"
600602
else:

0 commit comments

Comments
 (0)
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