Make sure PyPy is only patched once, and use check_call to execute 'patch'
This commit is contained in:
committed by
Yannick Jadoul
parent
60dd3f0807
commit
0d2bec3cb8
@@ -87,11 +87,11 @@ def install_pypy(version, url, symlinks_dir):
|
|||||||
download(url, os.path.join("/tmp", pypy_tar_bz2))
|
download(url, os.path.join("/tmp", pypy_tar_bz2))
|
||||||
call(['tar', '-C', '/tmp', '-xf', os.path.join("/tmp", pypy_tar_bz2)])
|
call(['tar', '-C', '/tmp', '-xf', os.path.join("/tmp", pypy_tar_bz2)])
|
||||||
|
|
||||||
# fix PyPy 7.3.0 bug resulting in wrong macOS platform tag
|
# fix PyPy 7.3.0 bug resulting in wrong macOS platform tag
|
||||||
if version.endswith("-v7.3.0") and version[0] == '3':
|
if version.endswith("-v7.3.0") and version[0] == '3':
|
||||||
patch_file = os.path.abspath(os.path.join(os.path.dirname(__file__), 'resources', 'pypy3.6.patch'))
|
patch_file = os.path.abspath(os.path.join(os.path.dirname(__file__), 'resources', 'pypy3.6.patch'))
|
||||||
sysconfigdata_file = os.path.join(installation_path, 'lib_pypy', '_sysconfigdata.py')
|
sysconfigdata_file = os.path.join(installation_path, 'lib_pypy', '_sysconfigdata.py')
|
||||||
subprocess.call(['patch', sysconfigdata_file, patch_file, '-N']) # Always has nonzero return code
|
call(['patch', sysconfigdata_file, patch_file, '-N']) # Always has nonzero return code
|
||||||
|
|
||||||
installation_bin_path = os.path.join(installation_path, 'bin')
|
installation_bin_path = os.path.join(installation_path, 'bin')
|
||||||
python_executable = 'pypy3' if version[0] == '3' else 'pypy'
|
python_executable = 'pypy3' if version[0] == '3' else 'pypy'
|
||||||
|
|||||||
Reference in New Issue
Block a user