File: Enforce-specutils-version-number-2-in-test.patch

package info (click to toggle)
specreduce 1.6.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,532 kB
  • sloc: python: 3,368; makefile: 109
file content (33 lines) | stat: -rw-r--r-- 1,026 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From: Ole Streicher <olebole@debian.org>
Date: Mon, 8 Sep 2025 21:35:14 +0200
Subject: Enforce specutils version number >= 2 in test

For some (unknown) reason, during the build time test assigns the
version number of specreduce to specutils. Because the specreduce
version number is smaller than 2, the wrog specutils API is used,
resulting in failing and erroring tests.

This does not happen in the autopkgtest with the installed package,
however.

Because the Debian specutils is a dependency of specreduce, we can
safely assume (and enforce) that it is >= 2.

Closes: #1114394
---
 specreduce/compat.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/specreduce/compat.py b/specreduce/compat.py
index 8d9b42f..017e2ab 100644
--- a/specreduce/compat.py
+++ b/specreduce/compat.py
@@ -3,7 +3,7 @@ from astropy.utils import minversion
 
 __all__ = []
 
-SPECUTILS_LT_2 = not minversion(specutils, "2.0.dev")
+SPECUTILS_LT_2 = False
 
 if SPECUTILS_LT_2:
     from specutils import Spectrum1D as Spectrum