Switch windows to python 3.3
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 26 Nov 2012 12:38:40 +0000 (12:38 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 26 Nov 2012 12:38:40 +0000 (12:38 +0000)
Should affect on msvc2008 only, however scons with msvc2010 could still be broken.

CMakeLists.txt
build_files/scons/config/win32-vc-config.py
build_files/scons/config/win64-vc-config.py
source/creator/CMakeLists.txt

index 751c2dd548ec50d94019084a81e7ade6d2d1cde8..c40decc424b588eb5e31bacc70b380f89b1096b1 100644 (file)
@@ -1102,9 +1102,17 @@ elseif(WIN32)
 
                if(WITH_PYTHON)
                        # normally cached but not since we include them with blender
-                       set(PYTHON_VERSION 3.2) # CACHE STRING)
+                       if(MSVC10)
+                               set(PYTHON_VERSION 3.2) # CACHE STRING)
+                       else()
+                               set(PYTHON_VERSION 3.3) # CACHE STRING)
+                       endif()
+
                        set_lib_path(PYTHON "python")
-                       set(PYTHON_LIBRARY ${PYTHON}/lib/python32.lib) #CACHE FILEPATH
+                       STRING(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
+                       set(PYTHON_LIBRARY ${PYTHON}/lib/python${_PYTHON_VERSION_NO_DOTS}.lib) #CACHE FILEPATH
+                       unset(_PYTHON_VERSION_NO_DOTS)
+
                        #Shared includes for both vc2008 and vc2010
                        set(PYTHON_INCLUDE_DIR ${LIBDIR}/python/include/python${PYTHON_VERSION})
 
index 2120938ec714c99e7473712daeb967e9c765d266..21488e75f7ef1bc8b209f255e48b8f402fda8ef6 100644 (file)
@@ -9,10 +9,10 @@ BF_FFMPEG_LIB = 'avformat-53.lib avcodec-53.lib avdevice-53.lib avutil-51.lib sw
 BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-53.dll ${BF_FFMPEG_LIBPATH}/avcodec-53.dll ${BF_FFMPEG_LIBPATH}/avdevice-53.dll ${BF_FFMPEG_LIBPATH}/avutil-51.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
 
 BF_PYTHON = LIBDIR + '/python'
-BF_PYTHON_VERSION = '3.2'
+BF_PYTHON_VERSION = '3.3'
 BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
 BF_PYTHON_BINARY = 'python'
-BF_PYTHON_LIB = 'python32'
+BF_PYTHON_LIB = 'python33'
 BF_PYTHON_DLL = '${BF_PYTHON_LIB}'
 BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
 
index 15bcdf999bd8e2e38ab3851fd6a6891d52049845..c0ea7972aeb9189679abd18dfafa10f7593a10f9 100644 (file)
@@ -9,10 +9,10 @@ BF_FFMPEG_LIB = 'avformat-53.lib avcodec-53.lib avdevice-53.lib avutil-51.lib sw
 BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-53.dll ${BF_FFMPEG_LIBPATH}/avcodec-53.dll ${BF_FFMPEG_LIBPATH}/avdevice-53.dll ${BF_FFMPEG_LIBPATH}/avutil-51.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
 
 BF_PYTHON = LIBDIR + '/python'
-BF_PYTHON_VERSION = '3.2'
+BF_PYTHON_VERSION = '3.3'
 BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
 BF_PYTHON_BINARY = 'python'
-BF_PYTHON_LIB = 'python32'
+BF_PYTHON_LIB = 'python33'
 BF_PYTHON_DLL = '${BF_PYTHON_LIB}'
 BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
 
index 32b990d14c56d58713c72831bd7d00bcd7233b65..b66c000ac8904cd6b0be2d5dda54f694d370112c 100644 (file)
@@ -471,14 +471,17 @@ elseif(WIN32)
 
        if(WITH_PYTHON)
                set_lib_path(PYLIB "python")
+
+               STRING(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
+
                install(
-                       FILES ${PYLIB}/lib/python32.dll
+                       FILES ${PYLIB}/lib/python${_PYTHON_VERSION_NO_DOTS}.dll
                        DESTINATION ${TARGETDIR}
                        CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel
                )
 
                install(
-                       FILES ${PYLIB}/lib/python32_d.dll
+                       FILES ${PYLIB}/lib/python${_PYTHON_VERSION_NO_DOTS}_d.dll
                        DESTINATION ${TARGETDIR}
                        CONFIGURATIONS Debug
                )
@@ -502,10 +505,10 @@ elseif(WIN32)
                                "
                                if(\"\${CMAKE_INSTALL_CONFIG_NAME}\" STREQUAL \"Debug\")
                                        execute_process(COMMAND \"${CMAKE_COMMAND}\" -E chdir \"${TARGETDIR_VER}/python/lib\"
-                                               \"${CMAKE_COMMAND}\" -E tar xzfv \"${LIBDIR}/release/python32_d.tar.gz\")
+                                               \"${CMAKE_COMMAND}\" -E tar xzfv \"${LIBDIR}/release/python${_PYTHON_VERSION_NO_DOTS}_d.tar.gz\")
                                else()
                                        execute_process(COMMAND \"${CMAKE_COMMAND}\" -E chdir \"${TARGETDIR_VER}/python/lib\"
-                                               \"${CMAKE_COMMAND}\" -E tar xzfv \"${LIBDIR}/release/python32.tar.gz\")
+                                               \"${CMAKE_COMMAND}\" -E tar xzfv \"${LIBDIR}/release/python${_PYTHON_VERSION_NO_DOTS}.tar.gz\")
                                endif()
                                "
                        )
@@ -513,6 +516,8 @@ elseif(WIN32)
                        # doesnt work, todo
                        # install(CODE "execute_process(COMMAND find ${TARGETDIR}/${BLENDER_VERSION}/python/lib/ -name '*.so' -exec strip -s {} '\;')")
                endif()
+
+               unset(_PYTHON_VERSION_NO_DOTS)
        endif()
 
        if(CMAKE_CL_64)