[med-svn] [Git][med-team/invesalius][master] 6 commits: d/rules: prepare a dedicated home directory.

Étienne Mollier (@emollier) gitlab at salsa.debian.org
Sun Feb 16 13:51:18 GMT 2025



Étienne Mollier pushed to branch master at Debian Med / invesalius


Commits:
3d4ed37c by Étienne Mollier at 2025-02-16T14:43:23+01:00
d/rules: prepare a dedicated home directory.

This prevents the build from affecting the builder's home directory.

- - - - -
fc5339bd by Étienne Mollier at 2025-02-16T14:44:37+01:00
d/t/run-unit-test: dedicate a home directory.

This avoids having the test suite to meddle with the home directory.

- - - - -
acaae710 by Étienne Mollier at 2025-02-16T14:46:21+01:00
fix-my-types.patch: new: fix build error caused by obsolete cython idiom.

- - - - -
48d4bc63 by Étienne Mollier at 2025-02-16T14:48:55+01:00
workaround-dropped-inner1d.patch: new: fix test failure with numpy 2.x.

Closes: #1092908

- - - - -
53291674 by Étienne Mollier at 2025-02-16T14:50:18+01:00
d/patches/*: normalize Last-Update timestamps.

- - - - -
b0bfc316 by Étienne Mollier at 2025-02-16T14:50:56+01:00
d/changelog: ready for upload to unstable.

- - - - -


12 changed files:

- debian/changelog
- debian/patches/0005-Distutils-is-being-deprecated-using-setuptools.patch
- debian/patches/0006-mark-a-string-as-raw-to-deal-with-a-Windows-slash.patch
- debian/patches/11_add_auibar.patch
- debian/patches/11_python311.patch
- debian/patches/11_rm_gdcm_trace.patch
- debian/patches/11_wxpython_int_fix.patch
- + debian/patches/fix-my-types.patch
- debian/patches/series
- + debian/patches/workaround-dropped-inner1d.patch
- debian/rules
- debian/tests/run-unit-test


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,17 @@
+invesalius (3.1.99998-7) unstable; urgency=medium
+
+  * Team upload.
+  * d/rules: prepare a dedicated home directory.
+    This prevents the build from affecting the builder's home directory.
+  * d/t/run-unit-test: dedicate a home directory.
+    This avoids having the test suite to meddle with the home directory.
+  * fix-my-types.patch: new: fix build error caused by obsolete cython idiom.
+  * workaround-dropped-inner1d.patch: new: fix test failure with numpy 2.x.
+    (Closes: #1092908)
+  * d/patches/*: normalize Last-Update timestamps.
+
+ -- Étienne Mollier <emollier at debian.org>  Sun, 16 Feb 2025 14:50:44 +0100
+
 invesalius (3.1.99998-6) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/patches/0005-Distutils-is-being-deprecated-using-setuptools.patch
=====================================
@@ -1,5 +1,5 @@
 From: Thiago Franco de Moraes <totonixsame at gmail.com>
-Date: Wed, 11 May 2022 17:16:14 -0300
+Last-Update: 2022-05-11
 Subject: Distutils is being deprecated using setuptools
 
 ---


=====================================
debian/patches/0006-mark-a-string-as-raw-to-deal-with-a-Windows-slash.patch
=====================================
@@ -1,5 +1,5 @@
 From: "Michael R. Crusoe" <crusoe at debian.org>
-Date: Tue, 10 Sep 2024 12:54:03 +0200
+Last-Update: 2024-09-10
 Subject: mark a string as raw to deal with a Windows slash
 
 Forwarded: https://github.com/invesalius/invesalius3/pull/841


=====================================
debian/patches/11_add_auibar.patch
=====================================
@@ -1,5 +1,5 @@
 From: Thiago Franco de Moraes <totonixsame at gmail.com>
-Date: Tue, 10 Sep 2024 12:46:30 +0200
+Last-Update: 2024-09-10
 Subject: Add missing widget
 
 Last-Update: 2022-07-26 19:23:03 -0300


=====================================
debian/patches/11_python311.patch
=====================================
@@ -1,5 +1,5 @@
 From: Thiago Franco de Moraes <totonixsame at gmail.com>
-Date: Tue, 10 Sep 2024 12:46:30 +0200
+Last-Update: 2024-09-10
 Subject: Python-3.11 gettext.translation doesn't have the 'codeset' parameter
  anymore
 


=====================================
debian/patches/11_rm_gdcm_trace.patch
=====================================
@@ -1,5 +1,5 @@
 From: Thiago Franco de Moraes <totonixsame at gmail.com>
-Date: Tue, 10 Sep 2024 12:46:30 +0200
+Last-Update: 2024-09-10
 Subject: Trace_DebugOff and Trace_WarningOff was removed from gdcm.
 
 Last-Update: 2023-02-08 17:19:03 -0300


=====================================
debian/patches/11_wxpython_int_fix.patch
=====================================
@@ -1,5 +1,5 @@
 From: Thiago Franco de Moraes <totonixsame at gmail.com>
-Date: Tue, 10 Sep 2024 12:46:30 +0200
+Last-Update: 2024-09-10
 Subject: Force integer positions
 
 Last-Update: 2022-07-22 17:49:36 -0300


=====================================
debian/patches/fix-my-types.patch
=====================================
@@ -0,0 +1,34 @@
+Description: workaround IF deprecation in cython.
+ This patch fixes the following error when building the package:
+ .
+        warning: ./invesalius_cy/cy_my_types.pxd:18:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
+        Error compiling Cython file:
+        ------------------------------------------------------------
+        ...
+        # To compile in windows 64
+        IF UNAME_MACHINE == 'AMD64':
+            ctypedef np.int64_t vertex_id_t
+        ELSE:
+            ctypedef np.int_t vertex_id_t
+                     ^
+        ------------------------------------------------------------
+        ./invesalius_cy/cy_my_types.pxd:21:13: 'int_t' is not a type identifier
+
+Author: Étienne Mollier <emollier at debian.org>
+Forwarded: no
+Last-Update: 2025-02-16
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- invesalius.orig/invesalius_cy/cy_my_types.pxd
++++ invesalius/invesalius_cy/cy_my_types.pxd
+@@ -13,9 +13,4 @@
+ 
+ ctypedef np.float32_t vertex_t
+ ctypedef np.float32_t normal_t
+-
+-# To compile in windows 64
+-IF UNAME_MACHINE == 'AMD64':
+-    ctypedef np.int64_t vertex_id_t
+-ELSE:
+-    ctypedef np.int_t vertex_id_t
++ctypedef np.int64_t vertex_id_t


=====================================
debian/patches/series
=====================================
@@ -5,3 +5,5 @@
 0005-Distutils-is-being-deprecated-using-setuptools.patch
 0006-mark-a-string-as-raw-to-deal-with-a-Windows-slash.patch
 python3.13
+fix-my-types.patch
+workaround-dropped-inner1d.patch


=====================================
debian/patches/workaround-dropped-inner1d.patch
=====================================
@@ -0,0 +1,74 @@
+Description: workaround dropped umath_test module in numpy 2.x.
+ This patch works around uses of inner1d using workaround suggested
+ upstream[1].
+ .
+ [1]: https://github.com/numpy/numpy/issues/10815
+Author: Étienne Mollier <emollier at debian.org>
+Forwarded: no
+Last-Update: 2025-02-16
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- invesalius.orig/invesalius/data/viewer_volume.py
++++ invesalius/invesalius/data/viewer_volume.py
+@@ -25,7 +25,6 @@
+ import time
+ 
+ import numpy as np
+-from numpy.core.umath_tests import inner1d
+ import wx
+ import vtk
+ from vtk.wx.wxVTKRenderWindowInteractor import wxVTKRenderWindowInteractor
+@@ -1243,10 +1242,10 @@
+         cam_pos0 = np.array(cam.GetPosition())
+         cam_focus0 = np.array(cam.GetFocalPoint())
+         v0 = cam_pos0 - cam_focus0
+-        v0n = np.sqrt(inner1d(v0, v0))
++        v0n = np.sqrt(np.dot(v0, v0))
+ 
+         v1 = (cam_focus[0] - cam_focus0[0], cam_focus[1] - cam_focus0[1], cam_focus[2] - cam_focus0[2])
+-        v1n = np.sqrt(inner1d(v1, v1))
++        v1n = np.sqrt(np.dot(v1, v1))
+         if not v1n:
+             v1n = 1.0
+         cam_pos = (v1 / v1n) * v0n + cam_focus
+@@ -1826,14 +1825,14 @@
+             cam_pos0 = np.array(cam.GetPosition())
+             cam_focus0 = np.array(cam.GetFocalPoint())
+             v0 = cam_pos0 - cam_focus0
+-            v0n = np.sqrt(inner1d(v0, v0))
++            v0n = np.sqrt(np.dot(v0, v0))
+ 
+             if self.obj_state:
+                 v1 = (cam_focus[0] - self.pTarget[0], cam_focus[1] - self.pTarget[1], cam_focus[2] - self.pTarget[2])
+             else:
+                 v1 = (cam_focus - self.initial_focus)
+ 
+-            v1n = np.sqrt(inner1d(v1, v1))
++            v1n = np.sqrt(np.dot(v1, v1))
+             if not v1n:
+                 v1n = 1.0
+             cam_pos = (v1/v1n)*v0n + cam_focus
+--- invesalius.orig/invesalius/gui/dialogs.py
++++ invesalius/invesalius/gui/dialogs.py
+@@ -66,7 +66,6 @@
+ from invesalius.gui.widgets import clut_imagedata
+ from invesalius.gui.widgets.clut_imagedata import CLUTImageDataWidget, EVT_CLUT_NODE_CHANGED
+ import numpy as np
+-from numpy.core.umath_tests import inner1d
+ 
+ from invesalius import inv_paths
+ 
+@@ -3890,11 +3889,11 @@
+         cam_pos0 = np.array(cam.GetPosition())
+         cam_focus0 = np.array(cam.GetFocalPoint())
+         v0 = cam_pos0 - cam_focus0
+-        v0n = np.sqrt(inner1d(v0, v0))
++        v0n = np.sqrt(np.dot(v0, v0))
+ 
+         v1 = (cam_focus - self.initial_focus)
+ 
+-        v1n = np.sqrt(inner1d(v1, v1))
++        v1n = np.sqrt(np.dot(v1, v1))
+         if not v1n:
+             v1n = 1.0
+         cam_pos = (v1/v1n)*v0n + cam_focus


=====================================
debian/rules
=====================================
@@ -5,6 +5,7 @@
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow
 export PYBUILD_NAME=invesalius
+export HOME=$(shell mktemp --directory /tmp/home.XXXXXX)
 
 %:
 	dh $@ --buildsystem=pybuild


=====================================
debian/tests/run-unit-test
=====================================
@@ -1,5 +1,6 @@
 #!/bin/sh -e
-
+HOME="$(mktemp --directory /tmp/home.XXXXXX)"
+export HOME
 invesalius3 --help
 invesalius3 --no-gui
-
+rm -rv "$HOME"



View it on GitLab: https://salsa.debian.org/med-team/invesalius/-/compare/c1cfeed0ddf4f781891356f32655c18b0e10196d...b0bfc31613cfe3b674a86dc03c0eba2ea46cbacc

-- 
View it on GitLab: https://salsa.debian.org/med-team/invesalius/-/compare/c1cfeed0ddf4f781891356f32655c18b0e10196d...b0bfc31613cfe3b674a86dc03c0eba2ea46cbacc
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20250216/4926aa1f/attachment-0001.htm>


More information about the debian-med-commit mailing list