Bug#1084277: imexam: FTBFS against python 3.15rc2

2026-10-23 Thread Maximiliano Curia

¡Hola!

Just a minor update, I sent the patches upstream [2] and added an issue [1]
about the upstream state of imexam.
The upstream response is that "this repository is not under active
development. I'm not sure of it's future support, that is under
discussion." ... "for now you are safe to remove it from debian packaging"

Happy hacking,

[1]: https://github.com/spacetelescope/imexam/issues/269
[2]: https://github.com/spacetelescope/imexam/pull/270
--
"Executive ability is deciding quickly and getting somebody else to do the
work."
-- Pollard's Postulate
Saludos /\/\ /\ >< `/


signature.asc
Description: PGP signature


Bug#1084277: imexam: FTBFS against python 3.15rc2

2026-09-12 Thread Maximiliano Curia

user [email protected]
usertags 1084277 python3.15
tags 1084277 patch
thanks

Hi!

While rebuilding the python related packages against the Python 3.15rc2
version I ran into this FTBFS [1]. 


To get it back into a buildable state I needed to apply numerous fixes:
- Upstream patch 3f991f9 Update setup.py
- Upstream patch d7f82ac, 9a4e7a4, a4f3cbf Update setup.cfg
- Upstream patch 1ac361b Update __init__
- Upstream patch 60839f9 Update astropy_init
- Drop patch to remove astropy test runner
- Add patch to fix test failures with NumPy 2.x
- Add patch to support photutils >= 2.0 and handle optional import
  errors
- Replace patch Don-t-use-doctest-extension-in-sphinx.patch with
  backport of cee4c15 / 29b6511
- Add missing python3-pytest autopkgtest dependency

I've applied these fixes in the sandbox [2] to verify that it builds
successfully, these should be applied in Debian to get the package back
to a healthy state.

Happy hacking,

[1]: https://debusine.debian.net/debian/r-python-python3.15/artifact/4645860/
[2]: https://debusine.debian.net/debian/r-python-python3.15/

--
"Can you imagine what I would do if I could do all I can?" -- Sun Tzu
Saludos /\/\ /\ >< `/
diff -Nru imexam-0.9.1/debian/changelog imexam-0.9.1/debian/changelog
--- imexam-0.9.1/debian/changelog   2023-11-28 10:08:03.0 +0100
+++ imexam-0.9.1/debian/changelog   2026-09-11 20:25:28.0 +0200
@@ -1,3 +1,20 @@
+imexam (0.9.1-6.1) UNRELEASED; urgency=medium
+
+  * Team upload.
+  * Upstream patch 3f991f9 Update setup.py
+  * Upstream patch d7f82ac, 9a4e7a4, a4f3cbf Update setup.cfg
+  * Upstream patch 1ac361b Update __init__
+  * Upstream patch 60839f9 Update astropy_init
+  * Drop patch to remove astropy test runner
+  * Add patch to fix test failures with NumPy 2.x
+  * Add patch to support photutils >= 2.0 and handle optional import
+errors
+  * Replace patch Don-t-use-doctest-extension-in-sphinx.patch with
+backport of cee4c15 / 29b6511
+  * Add missing python3-pytest autopkgtest dependency
+
+ -- Maximiliano Curia   Fri, 11 Sep 2026 20:25:28 +0200
+
 imexam (0.9.1-6) unstable; urgency=medium
 
   * Remove unused astropy config code (Astropy 6.0)
diff -Nru imexam-0.9.1/debian/patches/Add-tests-subdir-to-copy.patch 
imexam-0.9.1/debian/patches/Add-tests-subdir-to-copy.patch
--- imexam-0.9.1/debian/patches/Add-tests-subdir-to-copy.patch  2023-11-28 
10:07:55.0 +0100
+++ imexam-0.9.1/debian/patches/Add-tests-subdir-to-copy.patch  1970-01-01 
01:00:00.0 +0100
@@ -1,20 +0,0 @@
-From: Ole Streicher 
-Date: Thu, 16 Apr 2020 13:24:10 +0200
-Subject: Add tests subdir to copy
-

- setup.cfg | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/setup.cfg b/setup.cfg
-index 9a22f76..b6aed77 100644
 a/setup.cfg
-+++ b/setup.cfg
-@@ -27,6 +27,7 @@ setup_requires =
-   setuptools >= 30.3.0
- packages = 
-   imexam
-+  imexam/tests
- install_requires = 
-   numpy>=1.14
-   scipy>=0.18
diff -Nru 
imexam-0.9.1/debian/patches/Don-t-use-doctest-extension-in-sphinx.patch 
imexam-0.9.1/debian/patches/Don-t-use-doctest-extension-in-sphinx.patch
--- imexam-0.9.1/debian/patches/Don-t-use-doctest-extension-in-sphinx.patch 
2023-11-28 10:07:55.0 +0100
+++ imexam-0.9.1/debian/patches/Don-t-use-doctest-extension-in-sphinx.patch 
1970-01-01 01:00:00.0 +0100
@@ -1,20 +0,0 @@
-From: Ole Streicher 
-Date: Mon, 25 Oct 2021 08:43:43 +0200
-Subject: Don't use doctest extension in sphinx
-

- docs/conf.py | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/docs/conf.py b/docs/conf.py
-index 72a4b06..086bb39 100644
 a/docs/conf.py
-+++ b/docs/conf.py
-@@ -130,7 +130,6 @@ extensions = [
- 'sphinx_automodapi.automodsumm',
- 'sphinx_automodapi.autodoc_enhancements',
- 'sphinx_automodapi.smart_resolver',
--'sphinx_astropy.ext.doctest',
- ]
- 
- 
diff -Nru imexam-0.9.1/debian/patches/numpy-2.patch 
imexam-0.9.1/debian/patches/numpy-2.patch
--- imexam-0.9.1/debian/patches/numpy-2.patch   1970-01-01 01:00:00.0 
+0100
+++ imexam-0.9.1/debian/patches/numpy-2.patch   2026-09-11 20:25:28.0 
+0200
@@ -0,0 +1,27 @@
+Description: Fix test failures with NumPy 2.x
+ NumPy 2.x no longer allows converting 1D single-element arrays to Python
+ scalars. Extract scalar integers from the result of np.where in radial
+ profile tests.
+
+Index: imexam/imexam/tests/test_imexamine.py
+===
+--- imexam.orig/imexam/tests/test_imexamine.py
 imexam/imexam/tests/test_imexamine.py
+@@ -146,6 +146,8 @@ def test_radial_profile():
+ data = Gaussian2DKernel(1.5, x_size=25, y_size=25)
+ xx, yy = np.meshgrid(np.arange(25), np.arange(25))
+ x0, y0 = np.where(data.array == data.array.max())
++x0 = int(x0[0])
++y0 = int(y0[0])
+ 
+ rad_in = np.sqrt((xx - x0)**2 + (yy - y0)**2)
+ rad_in = rad_in.ravel()
+@@ -186,6 +188,8 @@ def test_radial_profile_cumulative():
+