Skip to content

Commit 7ce83a3

Browse files
committed
venv: install more launchers and batch scripts
1 parent 5248fde commit 7ce83a3

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

Lib/venv/__init__.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import types
1414
import shlex
1515

16-
from sysconfig import _POSIX_BUILD
1716

1817
CORE_VENV_DEPS = ('pip',)
1918
logger = logging.getLogger(__name__)
@@ -331,7 +330,7 @@ def setup_python(self, context):
331330
if not os.path.islink(path):
332331
os.chmod(path, 0o755)
333332
else:
334-
if self.symlinks and not _POSIX_BUILD:
333+
if self.symlinks:
335334
# For symlinking, we need a complete copy of the root directory
336335
# If symlinks fail, you'll get unnecessary copies of files, but
337336
# we assume that if you've opted into symlinks on Windows then
@@ -355,11 +354,10 @@ def setup_python(self, context):
355354
if os.path.lexists(src):
356355
copier(src, os.path.join(binpath, suffix))
357356

358-
if _POSIX_BUILD:
359-
# copy from python/pythonw so the venvlauncher magic in symlink_or_copy triggers
360-
copier(os.path.join(dirname, 'python.exe'), os.path.join(binpath, 'python3.exe'))
361-
copier(os.path.join(dirname, 'python.exe'), os.path.join(binpath, 'python%d.%d.exe' % sys.version_info[:2]))
362-
copier(os.path.join(dirname, 'pythonw.exe'), os.path.join(binpath, 'python3w.exe'))
357+
# copy from python/pythonw so the venvlauncher magic in symlink_or_copy triggers
358+
copier(os.path.join(dirname, 'python.exe'), os.path.join(binpath, 'python3.exe'))
359+
copier(os.path.join(dirname, 'python.exe'), os.path.join(binpath, 'python%d.%d.exe' % sys.version_info[:2]))
360+
copier(os.path.join(dirname, 'pythonw.exe'), os.path.join(binpath, 'python3w.exe'))
363361

364362
if sysconfig.is_python_build():
365363
# copy init.tcl
@@ -385,7 +383,6 @@ def _call_new_python(self, context, *py_args, **kwargs):
385383
env['VIRTUAL_ENV'] = context.env_dir
386384
env.pop('PYTHONHOME', None)
387385
env.pop('PYTHONPATH', None)
388-
env.pop("MSYSTEM", None)
389386
kwargs['cwd'] = context.env_dir
390387
kwargs['executable'] = context.env_exec_cmd
391388
subprocess.check_output(args, **kwargs)

Makefile.pre.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2174,7 +2174,7 @@ LIBSUBDIRS= asyncio \
21742174
msilib \
21752175
unittest \
21762176
urllib \
2177-
venv venv/scripts venv/scripts/common venv/scripts/posix \
2177+
venv venv/scripts venv/scripts/common venv/scripts/nt venv/scripts/posix \
21782178
wsgiref \
21792179
$(XMLLIBSUBDIRS) \
21802180
xmlrpc \

0 commit comments

Comments
 (0)