From 34a81f6988701dd1df76b49876ae92ba45428ae4 Mon Sep 17 00:00:00 2001 From: Patrick Storz Date: Wed, 12 Jun 2019 20:11:03 +0200 Subject: Packaging: Switch Windows distribution to Python 3.7 --- CMakeScripts/HelperFunctions.cmake | 6 +++--- CMakeScripts/InstallMSYS2.cmake | 19 ++++++++++--------- 2 files changed, 13 insertions(+), 12 deletions(-) (limited to 'CMakeScripts') diff --git a/CMakeScripts/HelperFunctions.cmake b/CMakeScripts/HelperFunctions.cmake index b564f4ef6..791dcbe74 100644 --- a/CMakeScripts/HelperFunctions.cmake +++ b/CMakeScripts/HelperFunctions.cmake @@ -101,12 +101,12 @@ endfunction(list_files_pacman) function(list_files_pip package_name file_list) # use pip to show package information including full list of files installed by the package execute_process( - COMMAND pip show -f ${package_name} + COMMAND pip3 show -f ${package_name} OUTPUT_FILE list_files_pip_temp.txt RESULT_VARIABLE res ERROR_VARIABLE err ) - check_error("${res}" "${err}" "pip show -f ${package_name}") + check_error("${res}" "${err}" "pip3 show -f ${package_name}") # clean up output execute_process( @@ -118,7 +118,7 @@ function(list_files_pip package_name file_list) RESULT_VARIABLE res ERROR_VARIABLE err ) - check_error("${res}" "${err}" "Parsing result of 'pip show -f ${package_name}'") + check_error("${res}" "${err}" "Parsing result of 'pip3 show -f ${package_name}'") SET(${file_list} ${out} PARENT_SCOPE) file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/list_files_pip_temp.txt) diff --git a/CMakeScripts/InstallMSYS2.cmake b/CMakeScripts/InstallMSYS2.cmake index 36fd94264..74135d250 100644 --- a/CMakeScripts/InstallMSYS2.cmake +++ b/CMakeScripts/InstallMSYS2.cmake @@ -74,6 +74,7 @@ if(WIN32) ${MINGW_BIN}/liblcms2-[0-9]*.dll ${MINGW_BIN}/liblqr-1-[0-9]*.dll ${MINGW_BIN}/liblzma-[0-9]*.dll + ${MINGW_BIN}/libmpdec-[0-9]*.dll ${MINGW_BIN}/libnghttp2-[0-9]*.dll ${MINGW_BIN}/libnspr[0-9]*.dll ${MINGW_BIN}/libopenblas.dll @@ -231,27 +232,27 @@ if(WIN32) DESTINATION bin) endif() - # Python (a bit hacky for backwards compatibility with devlibs at this point) + # Python (use executable names without version number for compatibility with python from python.org) install(FILES - ${MINGW_BIN}/python2.exe + ${MINGW_BIN}/python3.exe RENAME python.exe DESTINATION bin) install(FILES - ${MINGW_BIN}/python2w.exe + ${MINGW_BIN}/python3w.exe RENAME pythonw.exe DESTINATION bin) install(FILES - ${MINGW_BIN}/libpython2.7.dll + ${MINGW_BIN}/libpython3.7m.dll DESTINATION bin) - install(DIRECTORY ${MINGW_LIB}/python2.7 + install(DIRECTORY ${MINGW_LIB}/python3.7 DESTINATION lib - PATTERN "python2.7/site-packages" EXCLUDE # specify individual packages to install below - PATTERN "python2.7/test" EXCLUDE # we don't need the Python testsuite + PATTERN "python3.7/site-packages" EXCLUDE # specify individual packages to install below + PATTERN "python3.7/test" EXCLUDE # we don't need the Python testsuite ) - set(site_packages "lib/python2.7/site-packages") + set(site_packages "lib/python3.7/site-packages") # Python packages installed via pacman - set(packages "python2-lxml" "python2-numpy" "python2-pillow" "python2-six") + set(packages "python3-lxml" "python3-numpy" "python3-pillow" "python3-six") foreach(package ${packages}) list_files_pacman(${package} paths) install_list(FILES ${paths} -- cgit v1.2.3