Ticket #11120: python_jam.patch

File python_jam.patch, 1.6 KB (added by j.r.versteegh@…, 7 years ago)

Modification of python.jam to use abiflags

  • boost/tools/build/src/tools/python.jam

    diff --git a/boost/tools/build/src/tools/python.jam b/boost/tools/build/src/tools/python.jam
    index 90377ea..123f66a 100644
    a b local rule probe ( python-cmd )  
    493493                sys.$(s) = [ SUBST $(output) \\<$(s)=([^$(nl)]+) $1 ] ;
    494494            }
    495495        }
     496         # Try to get python abiflags
     497        full-cmd = $(python-cmd)" -c \"from sys import abiflags; print(abiflags, end='')\"" ;
     498
     499        sys.abiflags = [ SHELL $(full-cmd) ] ;
    496500        return $(output) ;
    497501    }
    498502}
    local rule probe ( python-cmd )  
    502506# have a value based on the information given.
    503507#
    504508local rule compute-default-paths ( target-os : version ? : prefix ? :
    505     exec-prefix ? )
     509    exec-prefix ? : abiflags ? )
    506510{
    507511    exec-prefix ?= $(prefix) ;
    508512
    local rule compute-default-paths ( target-os : version ? : prefix ? :  
    539543    }
    540544    else
    541545    {
    542         includes ?= $(prefix)/include/python$(version) ;
     546        includes ?= $(prefix)/include/python$(version)$(abiflags) ;
    543547
    544548        local lib = $(exec-prefix)/lib ;
    545549        libraries ?= $(lib)/python$(version)/config $(lib) ;
    local rule configure ( version ? : cmd-or-prefix ? : includes * : libraries ? :  
    783787                    exec-prefix = $(sys.exec_prefix) ;
    784788
    785789                    compute-default-paths $(target-os) : $(sys.version) :
    786                         $(sys.prefix) : $(sys.exec_prefix) ;
     790                        $(sys.prefix) : $(sys.exec_prefix) : $(sys.abiflags) ;
    787791
    788792                    version = $(sys.version) ;
    789793                    interpreter-cmd ?= $(cmd) ;