@@ -2258,8 +2258,8 @@ def test_remote_exec_deleted_libpython(self):
22582258 def test_remote_exec_deleted_static_executable (self ):
22592259 """Test remote exec when the target static executable was deleted."""
22602260 build_dir = sysconfig .get_config_var ('abs_builddir' )
2261- srcdir = sysconfig . get_config_var ( 'srcdir' )
2262- if not build_dir or not srcdir :
2261+ stdlib_dir = os . path . dirname ( os . path . abspath ( os . __file__ ) )
2262+ if not build_dir or not os . path . isdir ( stdlib_dir ) :
22632263 self .skipTest ('cannot determine build-tree locations' )
22642264
22652265 pybuilddir_txt = os .path .join (build_dir , 'pybuilddir.txt' )
@@ -2276,8 +2276,7 @@ def test_remote_exec_deleted_static_executable(self):
22762276 copied_build_dir = os .path .join (copied_root , 'build' )
22772277 copied_pybuilddir = os .path .join (copied_build_dir , pybuilddir )
22782278 os .makedirs (os .path .dirname (copied_pybuilddir ))
2279- os .symlink (os .path .join (srcdir , 'Lib' ),
2280- os .path .join (copied_root , 'Lib' ))
2279+ os .symlink (stdlib_dir , os .path .join (copied_root , 'Lib' ))
22812280 os .symlink (source_ext_dir , copied_pybuilddir )
22822281 shutil .copy2 (pybuilddir_txt ,
22832282 os .path .join (copied_build_dir , 'pybuilddir.txt' ))
0 commit comments