@@ -2292,8 +2292,8 @@ def test_remote_exec_deleted_libpython(self):
22922292 def test_remote_exec_deleted_static_executable (self ):
22932293 """Test remote exec when the target static executable was deleted."""
22942294 build_dir = sysconfig .get_config_var ('abs_builddir' )
2295- srcdir = sysconfig . get_config_var ( 'srcdir' )
2296- if not build_dir or not srcdir :
2295+ stdlib_dir = os . path . dirname ( os . path . abspath ( os . __file__ ) )
2296+ if not build_dir or not os . path . isdir ( stdlib_dir ) :
22972297 self .skipTest ('cannot determine build-tree locations' )
22982298
22992299 pybuilddir_txt = os .path .join (build_dir , 'pybuilddir.txt' )
@@ -2310,8 +2310,7 @@ def test_remote_exec_deleted_static_executable(self):
23102310 copied_build_dir = os .path .join (copied_root , 'build' )
23112311 copied_pybuilddir = os .path .join (copied_build_dir , pybuilddir )
23122312 os .makedirs (os .path .dirname (copied_pybuilddir ))
2313- os .symlink (os .path .join (srcdir , 'Lib' ),
2314- os .path .join (copied_root , 'Lib' ))
2313+ os .symlink (stdlib_dir , os .path .join (copied_root , 'Lib' ))
23152314 os .symlink (source_ext_dir , copied_pybuilddir )
23162315 shutil .copy2 (pybuilddir_txt ,
23172316 os .path .join (copied_build_dir , 'pybuilddir.txt' ))
0 commit comments