From a40b61a423ebf9c4161ec69de793b1be9953d3af Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Thu, 31 Aug 2006 08:01:13 +0000 Subject: [PATCH] Really remove the dot from the Python version when forming library name. [SVN r35007] --- src/tools/python.jam | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/tools/python.jam b/src/tools/python.jam index e59beeada..16dbe3217 100644 --- a/src/tools/python.jam +++ b/src/tools/python.jam @@ -300,7 +300,22 @@ 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 ] ; + # The name of Python library file does not have a dot between + # major and minor version. + local PYTHON_VERSION_NODOT = [ regex.match ([0-9]+)[.]([0-9]+).* : $(version) : 1 2 ] ; + if $(PYTHON_VERSION_NODOT) + { + PYTHON_VERSION_NODOT = $(PYTHON_VERSION_NODOT[1])$(PYTHON_VERSION_NODOT[2]) ; + } + else + { + # Try to link to 'python' lib, without version. Probably won't + # work, but better that not passing any library name at all. + PYTHON_VERSION_NODOT = "" ; + } + + + 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).* ] ; @@ -318,6 +333,7 @@ rule init-nt ( version : root ? : includes ? : libraries ? : cygwin-condition ? ECHO "notice: Python include path is" $(includes) ; ECHO "notice: Python library path is" $(libraries) ; ECHO "notice: Python interpreter is" $(interpreter) ; + ECHO "notice: Python library name is" python$(PYTHON_VERSION_NODOT) ; } flags python.capture-output PYTHON : $(interpreter) ;