diff --git a/src/tools/python.jam b/src/tools/python.jam index 69b0f7c0f..9ab611ebf 100644 --- a/src/tools/python.jam +++ b/src/tools/python.jam @@ -34,6 +34,7 @@ import "class" : new ; import os ; import common ; import toolset : flags ; +import regex ; # Make this module a project project.initialize $(__name__) ; @@ -296,6 +297,7 @@ rule init-nt ( version : root ? : includes ? : libraries ? : cygwin-condition ? PYTHON_INCLUDES ?= $(root)/include [ GLOB $(root) : PC ] ; + local PYTHON_VERSION_NODOT = [ regex.match ([0-9]+[.][0-9]+).* : $(version) : 1 ] ; PYTHON_DLL ?= [ GLOB $(PATH) $(Path) : python$(PYTHON_VERSION_NODOT).dll ] ; PYTHON_DEBUG_DLL ?= [ GLOB $(PATH) $(Path) : python$(PYTHON_VERSION_NODOT)_d.dll ] ; PYTHON_IMPORT_LIB ?= [ GLOB $(PYTHON_LIB_PATH) : libpython$(PYTHON_VERSION_NODOT).* ] ;