File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -577,19 +577,30 @@ def build(options: Options, tmp_path: Path) -> None:
577
577
package = build_options .package_dir ,
578
578
)
579
579
shell_with_arch (before_test_prepared , env = virtualenv_env )
580
+
581
+ # setting virtualenv_env used for pip install wheel
582
+ # set SYSTEM_VERSION_COMPAT=0 to ensure x86_64 cp38 python on
583
+ # arm64 runner can get correct macos version and allow installation
584
+ # of wheels with MACOSX_DEPLOYMENT_TARGET >= 11.0
585
+ # https://github.com/pypa/cibuildwheel/issues/1767
586
+ virtualenv_env_install_wheel = virtualenv_env .copy ()
587
+ virtualenv_env_install_wheel ["SYSTEM_VERSION_COMPAT" ] = "0"
580
588
581
589
# install the wheel
582
590
call_with_arch (
583
591
"pip" ,
584
592
"install" ,
585
593
f"{ repaired_wheel } { build_options .test_extras } " ,
586
- env = virtualenv_env ,
594
+ env = virtualenv_env_install_wheel ,
587
595
)
588
596
589
597
# test the wheel
590
598
if build_options .test_requires :
591
599
call_with_arch (
592
- "pip" , "install" , * build_options .test_requires , env = virtualenv_env
600
+ "pip" ,
601
+ "install" ,
602
+ * build_options .test_requires ,
603
+ env = virtualenv_env_install_wheel ,
593
604
)
594
605
595
606
# run the tests from a temp dir, with an absolute path in the command
You can’t perform that action at this time.
0 commit comments