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")
+7
View File
@@ -0,0 +1,7 @@
--- a/lib_pypy/_sysconfigdata.py Tue Jan 28 22:54:59 2020 +0200
+++ b/lib_pypy/_sysconfigdata.py Wed Jan 29 19:21:23 2020 +0200
@@ -47,4 +47,5 @@
build_time_vars['CC'] += ' -arch %s' % (arch,)
if "CXX" in build_time_vars:
build_time_vars['CXX'] += ' -arch %s' % (arch,)
+ build_time_vars['MACOSX_DEPLOYMENT_TARGET'] = '10.7'
+1 -5
View File
@@ -101,11 +101,7 @@ def expected_wheels(package_name, package_version, manylinux_versions=['manylinu
elif platform == 'macos':
def get_platform_tags(python_abi_tag):
default_version = '10.9'
if python_abi_tag == 'pp27-pypy_73':
default_version = '10.7'
elif python_abi_tag == 'pp36-pypy36_pp73':
default_version = '10.13'
default_version = '10.7' if python_abi_tag.startswith('pp') else '10.9'
return ['macosx_{}_x86_64'.format((macosx_deployment_target or default_version).replace('.', '_'))]
else:
raise Exception('unsupported platform')