[pypy-commit] pypy py3.5: Fix _sysconfigdata on MacOS

standy66 pypy.commits at gmail.com
Sat Jun 2 15:45:56 EDT 2018


Author: Andrew Stepanov <karn9050 at gmail.com>
Branch: py3.5
Changeset: r94721:87fe9e08fe50
Date: 2018-06-02 16:28 +0300
http://bitbucket.org/pypy/pypy/changeset/87fe9e08fe50/

Log:	Fix _sysconfigdata on MacOS

diff --git a/lib_pypy/_sysconfigdata.py b/lib_pypy/_sysconfigdata.py
--- a/lib_pypy/_sysconfigdata.py
+++ b/lib_pypy/_sysconfigdata.py
@@ -24,6 +24,15 @@
     'VERSION': sys.version[:3]
 }
 
+if find_executable("gcc"):
+    build_time_vars.update({
+        "CC": "gcc -pthread",
+        "GNULD": "yes",
+        "LDSHARED": "gcc -pthread -shared",
+    })
+    if find_executable("g++"):
+        build_time_vars["CXX"] = "g++ -pthread"
+
 if sys.platform[:6] == "darwin":
     import platform
     if platform.machine() == 'i386':
@@ -36,12 +45,6 @@
         arch = platform.machine()
     build_time_vars['LDSHARED'] += ' -undefined dynamic_lookup'
     build_time_vars['CC'] += ' -arch %s' % (arch,)
+    if "CXX" in build_time_vars:
+        build_time_vars['CXX'] += ' -arch %s' % (arch,)
 
-if find_executable("gcc"):
-    build_time_vars.update({
-        "CC": "gcc -pthread",
-        "GNULD": "yes",
-        "LDSHARED": "gcc -pthread -shared",
-    })
-    if find_executable("g++"):
-        build_time_vars["CXX"] = "g++ -pthread"


More information about the pypy-commit mailing list