1313import types
1414import shlex
1515
16- from sysconfig import _POSIX_BUILD
1716
1817CORE_VENV_DEPS = ('pip' ,)
1918logger = 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 )
0 commit comments