From 7701b45e89abdbf1980152441b239f717396813e Mon Sep 17 00:00:00 2001
From: Isuru Fernando <isuruf@gmail.com>
Date: Tue, 21 Sep 2021 13:05:20 -0500
Subject: [PATCH 04/25] bpo-45258: search for -isysroot in addition to
 --sysroot

-isysroot is for macOS, while --sysroot is for gcc/linux
---
 setup.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/setup.py b/setup.py
index e74a275edb..534b14104b 100644
--- a/setup.py
+++ b/setup.py
@@ -163,7 +163,7 @@ def sysroot_paths(make_vars, subdirs):
     for var_name in make_vars:
         var = sysconfig.get_config_var(var_name)
         if var is not None:
-            m = re.search(r'--sysroot=([^"]\S*|"[^"]+")', var)
+            m = re.search(r'(?:--sysroot|-isysroot)=([^"]\S*|"[^"]+")', var)
             if m is not None:
                 sysroot = m.group(1).strip('"')
                 for subdir in subdirs:
-- 
2.32.1 (Apple Git-133)

