38 lines
1.4 KiB
Diff
38 lines
1.4 KiB
Diff
--- Python-3.7.4/Lib/venv/__init__.py 2019-07-20 20:56:20.832694700 -0400
|
|
+++ Python-3.7.4/Lib/venv/__init__-patched.py 2019-07-21 11:13:44.980704100 -0400
|
|
@@ -11,6 +11,7 @@
|
|
import sys
|
|
import sysconfig
|
|
import types
|
|
+from sysconfig import _POSIX_BUILD
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
@@ -111,7 +112,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')
|
|
@@ -155,7 +156,7 @@
|
|
f.write('include-system-site-packages = %s\n' % incl)
|
|
f.write('version = %d.%d.%d\n' % sys.version_info[:3])
|
|
|
|
- if os.name != 'nt':
|
|
+ if os.name != 'nt' or _POSIX_BUILD:
|
|
def symlink_or_copy(self, src, dst, relative_symlinks_ok=False):
|
|
"""
|
|
Try symlinking a file, and if that fails, fall back to copying.
|
|
@@ -229,7 +230,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)
|