diff --git a/cibuildwheel/macos.py b/cibuildwheel/macos.py index 95554baf..6a246057 100644 --- a/cibuildwheel/macos.py +++ b/cibuildwheel/macos.py @@ -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") diff --git a/cibuildwheel/resources/pypy3.6.patch b/cibuildwheel/resources/pypy3.6.patch new file mode 100644 index 00000000..b42d4bfd --- /dev/null +++ b/cibuildwheel/resources/pypy3.6.patch @@ -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' diff --git a/test/shared/utils.py b/test/shared/utils.py index 48ffb5fd..3f7f0d03 100644 --- a/test/shared/utils.py +++ b/test/shared/utils.py @@ -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')