Path: csiph.com!news.mixmin.net!weretis.net!feeder8.news.weretis.net!fu-berlin.de!bofh.it!news.nic.it!robomod From: Colin Watson Newsgroups: linux.debian.bugs.dist,linux.debian.maint.python Subject: Bug#1093278: paraview needs a stricter python dependency Date: Sun, 19 Jan 2025 14:50:01 +0100 Message-ID: References: X-Original-To: Drew Parsons , 1093278@bugs.debian.org X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Sun Jan 19 13:48:08 2025 Old-Return-Path: X-Spam-Flag: NO X-Spam-Score: -3.999 Reply-To: Colin Watson , 1093278@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: Debian Science Team X-Debian-Pr-Message: followup 1093278 X-Debian-Pr-Package: paraview X-Debian-Pr-Source: paraview MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Debian-User: cjwatson X-Debian-Message: from BTS X-Mailing-List: archive/latest/1881281 List-ID: List-URL: Approved: robomod@news.nic.it Lines: 64 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Cc: Adrian Bunk , debian-python@lists.debian.org X-Original-Date: Sun, 19 Jan 2025 13:44:23 +0000 X-Original-Message-ID: X-Original-References: <173711009915.13505.14310322301139769980.reportbug@localhost> <173713739779.472571.3557562206937442082.reportbug@sandy> <173711009915.13505.14310322301139769980.reportbug@localhost> <173713739779.472571.3557562206937442082.reportbug@sandy> Xref: csiph.com linux.debian.bugs.dist:1229161 linux.debian.maint.python:16684 On Fri, Jan 17, 2025 at 07:09:57PM +0100, Drew Parsons wrote: > I'd be interested too to know if there's an existing mechanism for > this situation. paraview can't be the only package with python > extensions that can only be built for the default python. > > I'd say we'd want > Depends: python3.13 > rather than > Depends: python3 (>= 3.13~), python3 (<< 3.14) > > That way it will continue working even after the default python has > moved on, so long as the one it was built against remains. You can achieve that with: diff --git a/debian/rules b/debian/rules index 8c83e2741..e97efcc3b 100755 --- a/debian/rules +++ b/debian/rules @@ -129,7 +129,7 @@ my_test_python%: dh_auto_test -Bbuild.python$(pyver) override_dh_python3: - dh_python3 --no-ext-rename # Hack: Do not rename libraries from e.g. vtkClientServerPython.so to vtkClientServerPython.cpython-38-x86_64-linux-gnu.so! + dh_python3 -V $(PY3DEF) --no-ext-rename # Hack: Do not rename libraries from e.g. vtkClientServerPython.so to vtkClientServerPython.cpython-38-x86_64-linux-gnu.so! override_dh_auto_test: $(foreach pyver,$(PY3VERS), my_test_python$(pyver)) However, the problem is that the current autopkgtest has "#! /usr/bin/python3", so you'd have to fix that too; I'm not sure exactly how that would look. Presumably users expect it to work with the default Python as well. I tend to think that the dependencies suggested by Adrian would be a better fit here. You can achieve that with something like this (slightly hacky, but it's the simplest approach I can think of): diff --git a/debian/rules b/debian/rules index 8c83e2741..e97efcc3b 100755 --- a/debian/rules +++ b/debian/rules @@ -15,6 +15,7 @@ PY3DEF=$(shell py3versions -dv) # many libvtk*.so files link to the specific python version # so we can only support the default python PY3VERS=$(PY3DEF) +PY3RANGE=$(shell echo $(PY3DEF) | awk 'BEGIN { FS="." }; { print $$1 "." $$2 "-" $$1 "." $$2 + 1 }') # The Qt Svg component library is not detected automatically # but is needed for labels and icons in the paraview GUI. @@ -129,7 +130,7 @@ my_test_python%: dh_auto_test -Bbuild.python$(pyver) override_dh_python3: - dh_python3 --no-ext-rename # Hack: Do not rename libraries from e.g. vtkClientServerPython.so to vtkClientServerPython.cpython-38-x86_64-linux-gnu.so! + dh_python3 -V $(PY3RANGE) --no-ext-rename # Hack: Do not rename libraries from e.g. vtkClientServerPython.so to vtkClientServerPython.cpython-38-x86_64-linux-gnu.so! override_dh_auto_test: $(foreach pyver,$(PY3VERS), my_test_python$(pyver)) HTH, -- Colin Watson (he/him) [cjwatson@debian.org]