FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-139604: Test reverting a7a485558c05a59665d24f9bc048db8a41daf532. by StanFromIreland · Pull Request #139605 · python/cpython · GitHub

Repository navigation

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (2) .rst  (1) All 2 file types selected
Deleted files Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
10 changes: 8 additions & 2 deletions Lib/test/test_venv.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import pathlib
import re
import shutil
import struct
import subprocess
import sys
import sysconfig
Expand Down Expand Up @@ -137,9 +138,14 @@ def _check_output_of_default_create(self):
self.isdir(self.bindir)
self.isdir(self.include)
self.isdir(*self.lib)
# Issue 21197
p = self.get_env_file('lib64')
if os.path.exists(p):
self.assertFalse(os.path.islink(p))
conditions = ((struct.calcsize('P') == 8) and (os.name == 'posix') and
(sys.platform != 'darwin'))
if conditions:
self.assertTrue(os.path.islink(p))
else:
self.assertFalse(os.path.exists(p))
data = self.get_text_file_contents('pyvenv.cfg')
executable = sys._base_executable
path = os.path.dirname(executable)
Expand Down
9 changes: 6 additions & 3 deletions Lib/venv/__init__.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ def create_if_needed(d):
context.python_exe = exename
binpath = self._venv_path(env_dir, 'scripts')
libpath = self._venv_path(env_dir, 'purelib')
platlibpath = self._venv_path(env_dir, 'platlib')

# PEP 405 says venvs should create a local include directory.
# See https://peps.python.org/pep-0405/#include-files
Expand All @@ -192,8 +191,12 @@ def create_if_needed(d):
create_if_needed(incpath)
context.lib_path = libpath
create_if_needed(libpath)
context.platlib_path = platlibpath
create_if_needed(platlibpath)
# Issue 21197: create lib64 as a symlink to lib on 64-bit non-OS X POSIX
if ((sys.maxsize > 2**32) and (os.name == 'posix') and
(sys.platform != 'darwin')):
link_path = os.path.join(env_dir, 'lib64')
if not os.path.exists(link_path): # Issue #21643
os.symlink('lib', link_path)
context.bin_path = binpath
context.bin_name = os.path.relpath(binpath, env_dir)
context.env_exe = os.path.join(binpath, exename)
Expand Down

This file was deleted.

Loading

Back | FazBrowse Home | New Git URL