https://github.com/python/cpython/commit/940be2e2161883d1a908f5020369b858345beace commit: 940be2e2161883d1a908f5020369b858345beace branch: 3.14 author: Miss Islington (bot) <[email protected]> committer: StanFromIreland <[email protected]> date: 2026-06-30T13:25:34+02:00 summary:
[3.14] gh-151029: Fix `test_remote_exec_deleted_static_executable` on static installed builds (GH-152653) (#152669) (cherry picked from commit 03efeef226b774f937056e95e0cdb8f7d37c6532) Co-authored-by: Stan Ulbrych <[email protected]> files: M Lib/test/test_sys.py diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index 4cd9b7f4af25d4..e31020b6f8549e 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -2258,8 +2258,8 @@ def test_remote_exec_deleted_libpython(self): def test_remote_exec_deleted_static_executable(self): """Test remote exec when the target static executable was deleted.""" build_dir = sysconfig.get_config_var('abs_builddir') - srcdir = sysconfig.get_config_var('srcdir') - if not build_dir or not srcdir: + stdlib_dir = os.path.dirname(os.path.abspath(os.__file__)) + if not build_dir or not os.path.isdir(stdlib_dir): self.skipTest('cannot determine build-tree locations') pybuilddir_txt = os.path.join(build_dir, 'pybuilddir.txt') @@ -2276,8 +2276,7 @@ def test_remote_exec_deleted_static_executable(self): copied_build_dir = os.path.join(copied_root, 'build') copied_pybuilddir = os.path.join(copied_build_dir, pybuilddir) os.makedirs(os.path.dirname(copied_pybuilddir)) - os.symlink(os.path.join(srcdir, 'Lib'), - os.path.join(copied_root, 'Lib')) + os.symlink(stdlib_dir, os.path.join(copied_root, 'Lib')) os.symlink(source_ext_dir, copied_pybuilddir) shutil.copy2(pybuilddir_txt, os.path.join(copied_build_dir, 'pybuilddir.txt')) _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
