summaryrefslogblamecommitdiff
path: root/var/spack/repos/builtin/packages/boost/python_jam.patch
blob: 70054ba4edd9e999be7fe5aa4bf34cc788f4c68e (plain) (tree)









































                                                                                                   
diff --git a/tools/build/src/tools/python.jam b/tools/build/src/tools/python.jam
index 90377ea..123f66a 100644
--- a/tools/build/src/tools/python.jam
+++ b/tools/build/src/tools/python.jam
@@ -493,6 +493,10 @@ local rule probe ( python-cmd )
                 sys.$(s) = [ SUBST $(output) \\<$(s)=([^$(nl)]+) $1 ] ;
             }
         }
+         # Try to get python abiflags
+        full-cmd = $(python-cmd)" -c \"from sys import abiflags; print(abiflags, end='')\"" ;
+
+        sys.abiflags = [ SHELL $(full-cmd) ] ;
         return $(output) ;
     }
 }
@@ -502,7 +506,7 @@ local rule probe ( python-cmd )
 # have a value based on the information given.
 #
 local rule compute-default-paths ( target-os : version ? : prefix ? :
-    exec-prefix ? )
+    exec-prefix ? : abiflags ? )
 {
     exec-prefix ?= $(prefix) ;
 
@@ -539,7 +543,7 @@ local rule compute-default-paths ( target-os : version ? : prefix ? :
     }
     else
     {
-        includes ?= $(prefix)/include/python$(version) ;
+        includes ?= $(prefix)/include/python$(version)$(abiflags) ;
 
         local lib = $(exec-prefix)/lib ;
         libraries ?= $(lib)/python$(version)/config $(lib) ;
@@ -783,7 +787,7 @@ local rule configure ( version ? : cmd-or-prefix ? : includes * : libraries ? :
                     exec-prefix = $(sys.exec_prefix) ;
 
                     compute-default-paths $(target-os) : $(sys.version) :
-                        $(sys.prefix) : $(sys.exec_prefix) ;
+                        $(sys.prefix) : $(sys.exec_prefix) : $(sys.abiflags) ;
 
                     version = $(sys.version) ;
                     interpreter-cmd ?= $(cmd) ;