summaryrefslogtreecommitdiff
path: root/data/_python3.7/setup.diff
blob: 2e4049b25698c99ed5a8e10372d51e3291fab8aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
diff -Naur Python-3.7.7/setup.py Python-3.7.7+iPhone/setup.py
--- Python-3.7.7/setup.py	2020-03-09 23:11:12.000000000 -0700
+++ Python-3.7.7+iPhone/setup.py	2020-05-28 02:31:55.000000000 -0700
@@ -105,6 +105,8 @@
     """
     global MACOS_SDK_ROOT
 
+    MACOS_SDK_ROOT = os.environ['PKG_ROOT'] or '/'
+
     # If already called, return cached result.
     if MACOS_SDK_ROOT:
         return MACOS_SDK_ROOT
@@ -650,11 +652,10 @@
             # Add the sysroot paths. 'sysroot' is a compiler option used to
             # set the logical path of the standard system headers and
             # libraries.
-            lib_dirs = (self.compiler.library_dirs +
-                        sysroot_paths(('LDFLAGS', 'CC'), system_lib_dirs))
-            inc_dirs = (self.compiler.include_dirs +
-                        sysroot_paths(('CPPFLAGS', 'CFLAGS', 'CC'),
-                                      system_include_dirs))
+            lib_dirs = ([os.getenv('PKG_ROOT') + '/usr/lib'] +
+                        os.getenv('LIBRARY_PATH').split(':'))
+            inc_dirs = ([os.getenv('PKG_ROOT') + '/usr/include'] +
+                        os.getenv('CPATH').split(':'))
         exts = []
         missing = []