diff --git a/make.py b/make.py index f0c00ab8..972f5f98 100644 --- a/make.py +++ b/make.py @@ -2219,6 +2219,7 @@ def make_all( source_dirs=None, toolsdirs=None, docsdirs=None, + python_target_release=None, # 37101 for 3.7.10 ): """Make WinPython distribution, for a given base directory and architecture: @@ -2298,7 +2299,20 @@ def make_all( ) while not my_x.isdigit() and len(my_x) > 0: my_x = my_x[:-1] - my_winpydir = ( + + # simplify for PyPy + if not python_target_release == None : + my_winpydir = ( + 'WPy' + + ('%s' % architecture) + + '-' + + python_target_release + + '' + + ('%s' % build_number) + ) + release_level + # + flavor + else: + my_winpydir = ( 'WPy' + ('%s' % architecture) + '-' diff --git a/winpython/wppm.py b/winpython/wppm.py index f15d0c80..61afe41e 100644 --- a/winpython/wppm.py +++ b/winpython/wppm.py @@ -521,18 +521,20 @@ def patch_standard_packages( """patch Winpython packages in need""" import filecmp + # Adpating to PyPy + if 'pypy3' in osp.basename(utils.get_python_executable(self.target)): + site_package_place="\\site-packages\\" + else: + site_package_place="\\Lib\\site-packages\\" + + # 'pywin32' minimal post-install (pywin32_postinstall.py do too much) if ( package_name.lower() == "pywin32" or package_name == '' ): - origin = self.target + ( - r"\Lib\site-packages\pywin32_system32" - ) - if 'pypy3' in sys.executable: - origin = self.target + ( - r"\site-packages\pywin32_system32" - ) + origin = self.target + site_package_place + "pywin32_system32" + destin = self.target if osp.isdir(origin): for name in os.listdir(origin): @@ -556,10 +558,9 @@ def patch_standard_packages( sheb_fix = " executable = get_executable()" sheb_mov1 = " executable = os.path.join(os.path.basename(get_executable()))" sheb_mov2 = " executable = os.path.join('..',os.path.basename(get_executable()))" - if 'pypy3' in sys.executable: - the_place=r"\site-packages\pip\_vendor\distlib\scripts.py" - else: - the_place=r"\Lib\site-packages\pip\_vendor\distlib\scripts.py" + + # Adpating to PyPy + the_place=site_package_place + r"pip\_vendor\distlib\scripts.py" print(the_place) if to_movable: utils.patch_sourcefile( @@ -591,7 +592,7 @@ def patch_standard_packages( # will be in standard pip 8.0.3 utils.patch_sourcefile( self.target - + (r"\Lib\site-packages\pip\wheel.py"), + + (site_package_place +r"pip\wheel.py"), " writer.writerow((f, h, l))", " writer.writerow((normpath(f, lib_dir), h, l))", ) @@ -606,7 +607,7 @@ def patch_standard_packages( utils.patch_sourcefile( self.target + ( - r"\Lib\site-packages\spyderlib\config\main.py" + site_package_place+r"spyderlib\config\main.py" ), "'check_updates_on_startup': True,", "'check_updates_on_startup': False,", @@ -614,7 +615,7 @@ def patch_standard_packages( utils.patch_sourcefile( self.target + ( - r"\Lib\site-packages\spyder\config\main.py" + site_package_place+r"spyder\config\main.py" ), "'check_updates_on_startup': True,", "'check_updates_on_startup': False,",