[Bf-blender-cvs] [f75a7111789] master: CMake/Deps: Fix building cython on windows

Ray Molenkamp noreply at git.blender.org
Wed Feb 10 19:20:54 CET 2021


Commit: f75a71117895f2ca61e3bde935df5db24d7e5360
Author: Ray Molenkamp
Date:   Wed Feb 10 11:20:49 2021 -0700
Branches: master
https://developer.blender.org/rBf75a71117895f2ca61e3bde935df5db24d7e5360

CMake/Deps: Fix building cython on windows

For the debug version of cython pip was trying to link
against the release version of python for some strange
reason. Passing some flags to explicitly target the
debug version fixes the issue.

Given other platforms do not have different builds for
debug/release this is not an issue there.

===================================================================

M	build_files/build_environment/cmake/python_site_packages.cmake

===================================================================

diff --git a/build_files/build_environment/cmake/python_site_packages.cmake b/build_files/build_environment/cmake/python_site_packages.cmake
index 58d95326ee9..a3b9c3bf796 100644
--- a/build_files/build_environment/cmake/python_site_packages.cmake
+++ b/build_files/build_environment/cmake/python_site_packages.cmake
@@ -16,12 +16,16 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
+if(WIN32 AND BUILD_MODE STREQUAL Debug)
+  set(SITE_PACKAGES_EXTRA --global-option build --global-option --debug)
+endif()
+
 ExternalProject_Add(external_python_site_packages
   DOWNLOAD_COMMAND ""
   CONFIGURE_COMMAND ""
   BUILD_COMMAND ""
   PREFIX ${BUILD_DIR}/site_packages
-  INSTALL_COMMAND ${PYTHON_BINARY} -m pip install cython==${CYTHON_VERSION} idna==${IDNA_VERSION} chardet==${CHARDET_VERSION} urllib3==${URLLIB3_VERSION} certifi==${CERTIFI_VERSION} requests==${REQUESTS_VERSION} --no-binary :all:
+  INSTALL_COMMAND ${PYTHON_BINARY} -m pip install ${SITE_PACKAGES_EXTRA} cython==${CYTHON_VERSION} idna==${IDNA_VERSION} chardet==${CHARDET_VERSION} urllib3==${URLLIB3_VERSION} certifi==${CERTIFI_VERSION} requests==${REQUESTS_VERSION} --no-binary :all:
 )
 
 add_dependencies(



More information about the Bf-blender-cvs mailing list