Make sure PyPy is only patched once, and use check_call to execute 'patch'

This commit is contained in:
Grzegorz Bokota
2020-02-19 17:10:17 +01:00
committed by Yannick Jadoul
parent 60dd3f0807
commit 0d2bec3cb8
+1 -1
View File
@@ -91,7 +91,7 @@ def install_pypy(version, url, symlinks_dir):
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'