Skip to content

Commit d77b710

Browse files
committed
tweak PyPy-3.7 launchers
solves #1012
1 parent e2f85c6 commit d77b710

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

make.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,8 @@ def _create_batch_scripts_initial(self):
10091009
(r'DIR%\python.exe' , r'DIR%' + "\\" + shorty),
10101010
(r'DIR%\PYTHON.EXE' , r'DIR%' + "\\" + shorty),
10111011
)
1012-
if shorty == 'pypy3.exe':
1012+
if osp.isdir(osp.join(self.distribution.target,
1013+
r'lib-python\3\idlelib')):
10131014
changes += ((r'\Lib\idlelib' , r'\lib-python\3\idlelib'),)
10141015
self.create_batch_script(
10151016
'env.bat',
@@ -1477,7 +1478,8 @@ def _create_batch_scripts(self):
14771478
(r'DIR%\python.exe' , r'DIR%' + "\\" + shorty),
14781479
(r'DIR%\PYTHON.EXE' , r'DIR%' + "\\" + shorty),
14791480
)
1480-
if shorty == 'pypy3.exe':
1481+
if osp.isdir(osp.join(self.distribution.target,
1482+
r'lib-python\3\idlelib')):
14811483
changes += ((r'\Lib\idlelib' , r'\lib-python\3\idlelib'),)
14821484

14831485

winpython/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@
2828
OTHER DEALINGS IN THE SOFTWARE.
2929
"""
3030

31-
__version__ = '4.5.20210912'
31+
__version__ = '4.5.20210918'
3232
__license__ = __doc__
3333
__project_url__ = 'http://winpython.github.io/'

winpython/utils.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ def get_python_executable(path = None):
3333
"""return the python executable"""
3434
my_path = sys.executable if path == None else path # default = current one
3535
my_path = my_path if osp.isdir(my_path) else osp.dirname(my_path)
36-
exec_py = os.path.join(path, 'python.exe')
37-
exec_pypy = os.path.join(path, 'pypy3.exe') # PyPy !
36+
exec_py = os.path.join(my_path, 'python.exe')
37+
exec_pypy = os.path.join(my_path, 'pypy3.exe') # PyPy !
3838
# PyPy >=7.3.6 3.8 aligns to python.exe and Lib\site-packages
3939
#python_executable = exec_pypy if osp.isfile(exec_pypy) else exec_py
4040
python_executable = exec_py if osp.isfile(exec_py) else exec_pypy
@@ -44,8 +44,8 @@ def get_site_packages_path(path = None):
4444
"""return the python site-packages"""
4545
my_path = sys.executable if path == None else path # default = current one
4646
my_path = my_path if osp.isdir(my_path) else osp.dirname(my_path)
47-
site_py = os.path.join(path, 'Lib', 'site-packages')
48-
site_pypy = os.path.join(path, 'site-packages') # PyPy !!
47+
site_py = os.path.join(my_path, 'Lib', 'site-packages')
48+
site_pypy = os.path.join(my_path, 'site-packages') # PyPy !!
4949
site_packages_path = site_pypy if osp.isfile(site_pypy) else site_py
5050
return site_packages_path
5151

0 commit comments

Comments
 (0)