We aren't currently compiling the venvlauncher as part of python with gcc. Previous patches in PR #5625 removed the venvlauncher redirector by skipping "nt" platform portions in the venv module. Although the previous patches worked to fix venv, it left us with key venvlauncher files missing that were expected to be present in Windows. In issue #7014, tox and other tools that depend on virtualenv were unable to run. For example, there was issues with no such file or directory errors: 'mingw64/lib/python3.8/venv/scripts/nt/python.exe' This fixes these issues by removing some of the previous patches in venv and copying python.exe and pythonw.exe to the locations where the venvlauncher redirect files are expected. A future solution may be to try to compile venvlauncher using gcc.
30 lines
1.0 KiB
Diff
30 lines
1.0 KiB
Diff
diff -Naur Python-3.8.0-orig/Lib/venv/__init__.py Python-3.8.0/Lib/venv/__init__.py
|
|
--- Python-3.8.0-orig/Lib/venv/__init__.py 2019-10-14 16:34:47.000000000 +0300
|
|
+++ Python-3.8.0/Lib/venv/__init__.py 2019-10-22 10:05:19.975198800 +0300
|
|
@@ -11,6 +11,7 @@
|
|
import sys
|
|
import sysconfig
|
|
import types
|
|
+from sysconfig import _POSIX_BUILD
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
@@ -110,7 +111,7 @@
|
|
context.executable = executable
|
|
context.python_dir = dirname
|
|
context.python_exe = exename
|
|
- if sys.platform == 'win32':
|
|
+ if sys.platform == 'win32' and not _POSIX_BUILD:
|
|
binname = 'Scripts'
|
|
incpath = 'Include'
|
|
libpath = os.path.join(env_dir, 'Lib', 'site-packages')
|
|
@@ -230,7 +231,7 @@
|
|
path = context.env_exe
|
|
copier = self.symlink_or_copy
|
|
dirname = context.python_dir
|
|
- if os.name != 'nt':
|
|
+ if os.name != 'nt' or _POSIX_BUILD:
|
|
copier(context.executable, path)
|
|
if not os.path.islink(path):
|
|
os.chmod(path, 0o755)
|