diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2023-08-30 08:41:04 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-30 08:41:04 (GMT) |
commit | 210a5d7b8b2f5cdaf3740e8b9b468ed5ddf24591 (patch) | |
tree | 9883125f9a196e34282de8ae1d93b8687c39241f | |
parent | 24b9bdd6eaf0b04667b6cd4c8154f7c7c10c2398 (diff) | |
download | cpython-210a5d7b8b2f5cdaf3740e8b9b468ed5ddf24591.zip cpython-210a5d7b8b2f5cdaf3740e8b9b468ed5ddf24591.tar.gz cpython-210a5d7b8b2f5cdaf3740e8b9b468ed5ddf24591.tar.bz2 |
Revert "gh-103224: Use the realpath of the Python executable in `test_venv` (GH-103243)" (GH-108667)
This reverts commit 85b0b0cd947c5218260fb2bc2014c8c8de172d33.
It broke builtbots.
-rw-r--r-- | Lib/test/test_venv.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Lib/test/test_venv.py b/Lib/test/test_venv.py index 3d19b2b..5205604 100644 --- a/Lib/test/test_venv.py +++ b/Lib/test/test_venv.py @@ -208,8 +208,7 @@ class BasicTest(BaseTest): def test_upgrade_dependencies(self): builder = venv.EnvBuilder() bin_path = 'Scripts' if sys.platform == 'win32' else 'bin' - python_exe_realpath = os.path.realpath(sys._base_executable) - python_exe = os.path.split(python_exe_realpath)[1] + python_exe = os.path.split(sys.executable)[1] with tempfile.TemporaryDirectory() as fake_env_dir: expect_exe = os.path.normcase( os.path.join(fake_env_dir, bin_path, python_exe) @@ -552,8 +551,7 @@ class BasicTest(BaseTest): self.addCleanup(rmtree, non_installed_dir) bindir = os.path.join(non_installed_dir, self.bindir) os.mkdir(bindir) - python_exe_realpath = os.path.realpath(sys._base_executable) - shutil.copy2(python_exe_realpath, bindir) + shutil.copy2(sys.executable, bindir) libdir = os.path.join(non_installed_dir, platlibdir, self.lib[1]) os.makedirs(libdir) landmark = os.path.join(libdir, "os.py") @@ -597,7 +595,7 @@ class BasicTest(BaseTest): # libpython.so 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(python_exe_realpath)) + ld_library_path = os.path.abspath(os.path.dirname(sys.executable)) if sys.platform == 'darwin': ld_library_path_env = "DYLD_LIBRARY_PATH" else: |