8000 Fix for WinPython-3.6.0.0 · liming2013/winpython@b3dd036 · GitHub
[go: up one dir, main page]

Skip to content

Commit b3dd036

Browse files
author
stonebig
committed
Fix for WinPython-3.6.0.0
1 parent edbba1c commit b3dd036

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

make.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -389,9 +389,14 @@ def _extract_python(self):
389389
os.mkdir(self.python_dir)
390390
if self.python_fname[-3:] == 'zip': # Python3.5
391391
utils.extract_archive(self.python_fname, targetdir=self.python_dir+r'\..')
392-
# new Python 3.5 trick (https://bugs.python.org/issue23955)
393-
pyvenv_file = osp.join(self.python_dir, 'pyvenv.cfg')
394-
open(pyvenv_file, 'w').write('applocal=True\n')
392+
if self.winpyver < "3.6":
393+
# new Python 3.5 trick (https://bugs.python.org/issue23955)
394+
pyvenv_file = osp.join(self.python_dir, 'pyvenv.cfg')
395+
open(pyvenv_file, 'w').write('applocal=True\n')
396+
else:
397+
# new Python 3.6 trick (https://docs.python.org/3.6/using/windows.html#finding-modules)
398+
pypath_file = osp.join(self.python_dir, 'python._pth')
399+
open(pypath_file, 'w').write('.\nLib\nimport site\nDLLs\n#Lib/site-packages\n#python36.zip\n')
395400
else:
396401
utils.extract_msi(self.python_fname, targetdir=self.python_dir)
397402
os.remove(osp.join(self.python_dir, osp.basename(self.python_fname)))

0 commit comments

Comments
 (0)
0