Commit 34a81f69 authored by Patrick Storz's avatar Patrick Storz 🦄

Packaging: Switch Windows distribution to Python 3.7

parent 8a172e97
Pipeline #65938626 passed with stages
in 122 minutes and 47 seconds
......@@ -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)
......
......@@ -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}
......
......@@ -93,7 +93,7 @@ def collect_dependencies(path):
deps = get_dependencies(path, deps)
elif os.path.isdir(path):
extensions = ['.exe', '.pyd', '.dll']
exclusions = ['python2.7/distutils/command/wininst']
exclusions = ['python3.7/distutils/command/wininst']
for base, dirs, files in os.walk(path):
for f in files:
filepath = os.path.join(base, f)
......
......@@ -80,19 +80,19 @@ done
# install Python and modules used by Inkscape
eval pacman -S $PACMAN_OPTIONS \
$ARCH-python2 \
$ARCH-python2-pip \
$ARCH-python2-lxml \
$ARCH-python2-numpy \
$ARCH-python2-pillow \
$ARCH-python2-six
$ARCH-python3 \
$ARCH-python3-pip \
$ARCH-python3-lxml \
$ARCH-python3-numpy \
$ARCH-python3-pillow \
$ARCH-python3-six
for arch in $(eval echo $ARCH); do
case ${arch} in
mingw-w64-i686)
/mingw32/bin/pip install --upgrade coverage pyserial scour
/mingw32/bin/pip3 install --upgrade --upgrade-strategy eager coverage pyserial scour
;;
mingw-w64-x86_64)
/mingw64/bin/pip install --upgrade coverage pyserial scour
/mingw64/bin/pip3 install --upgrade --upgrade-strategy eager coverage pyserial scour
;;
esac
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment