index 0dfc750a22..703c501d08 100644 --- a/boost/tools/build/src/tools/python.jam +++ b/boost/tools/build/src/tools/python.jam @@ -547,13 +547,9 @@ local rule compute-default-paths ( target-os : version ? : prefix ? : } else { - local default-include-path = $(prefix)/include/python$(version) ; - if ! [ path.exists $(default-include-path) ] && [ path.exists $(default-include-path)m ] - { - default-include-path = $(default-include-path)m ; - } - - includes ?= $(default-include-path) ; + python_includes = [ shell-cmd "printf `python$(version) -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_inc());'`" ] ; + python_platincludes = [ shell-cmd "printf `python$(version) -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_inc(plat_specific=1));'`" ] ; + includes ?= $(python_includes) $(python_platincludes) ; local lib = $(exec-prefix)/lib ; libraries ?= $(lib)/python$(version)/config $(lib) ;