Apply PyPy patch with default MACOSX_DEPLOYMENT_TARGET to local installation

This commit is contained in:
Grzegorz Bokota
2020-02-15 23:24:51 +01:00
committed by Yannick Jadoul
parent 60f198c90d
commit 176f4aca1f
3 changed files with 13 additions and 5 deletions
+5
View File
@@ -90,6 +90,11 @@ def build(project_dir, output_dir, test_command, test_requires, test_extras, bef
installation_bin_path = install_pypy(config.version, config.url)
python_executable = 'pypy3' if config.version[0] == '3' else 'pypy'
pip_executable = 'pip3' if config.version[0] == '3' else 'pip'
# fix PyPy 7.3.0 bug resulting in wrong macOS platform tag
if config.version[0] == '3':
patch_file = os.path.abspath(os.path.join(os.path.dirname(__file__), 'resources', 'pypy3.6.patch'))
sysconfigdata_file = os.path.join(os.path.dirname(installation_bin_path), 'lib_pypy', '_sysconfigdata.py')
subprocess.call(['patch', sysconfigdata_file, patch_file , '-N']) # Always has nonzero return code
else:
raise ValueError("Unknown Python implementation")