Fwiw, olasd found a way to make it work using the current dh_python version:
https://salsa.debian.org/3dprinting-team/libarcus/commit/2503ec8273bdb67a710a0d2b633efa8909ed083c But having that built-in would be nicer. Christoph >From 2503ec8273bdb67a710a0d2b633efa8909ed083c Mon Sep 17 00:00:00 2001 From: Nicolas Dandrimont <[email protected]> Date: Mon, 20 Jan 2020 12:39:01 +0100 Subject: [PATCH] Add patch to force python version in CMake --- ...erriding-the-Python-version-in-CMake.patch | 35 +++++++++++++++++++ debian/patches/series | 1 + debian/rules | 2 ++ 3 files changed, 38 insertions(+) create mode 100644 debian/patches/0003-Allow-overriding-the-Python-version-in-CMake.patch diff --git a/debian/patches/0003-Allow-overriding-the-Python-version-in-CMake.patch b/debian/patches/0003-Allow-overriding-the-Python-version-in-CMake.patch new file mode 100644 index 0000000..870cfcc --- /dev/null +++ b/debian/patches/0003-Allow-overriding-the-Python-version-in-CMake.patch @@ -0,0 +1,35 @@ +From: Nicolas Dandrimont <[email protected]> +Date: Mon, 20 Jan 2020 12:37:08 +0100 +Subject: Allow overriding the Python version in CMake + +--- + CMakeLists.txt | 2 +- + cmake/FindSIP.cmake | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b97ee18..92cae18 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -32,7 +32,7 @@ if(BUILD_PYTHON) + find_package(PythonLibs 3.4 REQUIRED) + else() + # Use FindPython3 for CMake >=3.12 +- find_package(Python3 3.4 REQUIRED COMPONENTS Interpreter Development) ++ find_package(Python3 ${PYVER} EXACT REQUIRED COMPONENTS Interpreter Development) + endif() + + find_package(SIP REQUIRED) +diff --git a/cmake/FindSIP.cmake b/cmake/FindSIP.cmake +index 815a16d..90b5398 100644 +--- a/cmake/FindSIP.cmake ++++ b/cmake/FindSIP.cmake +@@ -63,7 +63,7 @@ if(${CMAKE_VERSION} VERSION_LESS 3.12) + endif() + else() + # Use FindPython3 for CMake >=3.12 +- find_package(Python3 3.4 REQUIRED COMPONENTS Interpreter Development) ++ find_package(Python3 ${PYVER} EXACT REQUIRED COMPONENTS Interpreter Development) + endif() + + get_filename_component(_python_binary_path ${Python3_EXECUTABLE} DIRECTORY) diff --git a/debian/patches/series b/debian/patches/series index dd440ac..a81baff 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ 01-remove-rpath.patch 02-add-python-version.patch +0003-Allow-overriding-the-Python-version-in-CMake.patch diff --git a/debian/rules b/debian/rules index fa1dac0..9d08fe2 100755 --- a/debian/rules +++ b/debian/rules @@ -4,5 +4,7 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk +export PYBUILD_CONFIGURE_ARGS=-DPYVER={version} + %: dh $@ --buildsystem=pybuild --with python3 --with sip3 -- 2.20.1

