Package: src:refnx
Version: 0.1.66-1
User: [email protected]
Usertags: python3.15
Tags: patch, ftbfs, forky, sid
Severity: important

Hi!

While rebuilding the python related packages against the Python 3.15rc2
version we found that refnx fails to build from source [1].

The error is: meson-python: error: The package declares compatibility
with Python limited API but extension module
'refnx/_lib/_cutil.abi3-x86_64-linux-gnu.so' is tagged for a specific
Python version.

Also matplotlib complains that it can't use DISPLAY when running the
tests.

To fix it, I had to make two changes to address those two issues:
- Avoid claiming limited api
- Use a headless backend for the build tests

I've applied these fixes in the sandbox [2] to verify that it builds
successfully, please consider applying the patch to support the upcoming
3.15 version.

Setting the severity to important for now. Once Python 3.15 is released,
it will be added to python3-defaults and this bug will become release
critical.

Happy hacking,

[1]: https://debusine.debian.net/debian/r-python-python3.15/artifact/4387111/
[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 refnx-0.1.66/debian/changelog refnx-0.1.66/debian/changelog
--- refnx-0.1.66/debian/changelog       2026-08-01 08:14:01.000000000 +0200
+++ refnx-0.1.66/debian/changelog       2026-09-11 17:52:44.000000000 +0200
@@ -1,3 +1,15 @@
+refnx (0.1.66-2) UNRELEASED; urgency=medium
+
+  [ Stuart Prescott ]
+  * Team upload.
+  * Update upstream copyright details
+
+  [ Maximiliano Curia ]
+  * Add patch to disable limited api
+  * Headless backend for the build tests
+
+ -- Maximiliano Curia <[email protected]>  Fri, 11 Sep 2026 17:52:44 +0200
+
 refnx (0.1.66-1) unstable; urgency=medium
 
   * New upstream release.
diff -Nru refnx-0.1.66/debian/copyright refnx-0.1.66/debian/copyright
--- refnx-0.1.66/debian/copyright       2026-08-01 08:14:01.000000000 +0200
+++ refnx-0.1.66/debian/copyright       2026-09-11 17:52:44.000000000 +0200
@@ -4,23 +4,8 @@
 Source: https://github.com/refnx/refnx
 
 Files: *
-Copyright: 2015 A. R. J. Nelson, Australian Nuclear Science and Technology 
Organisation
-License: custom
- Permission to use and redistribute the source code or binary forms of this
- software and its documentation, with or without modification is hereby
- granted provided that the above notice of copyright, these terms of use,
- and the disclaimer of warranty below appear in the source code and
- documentation, and that none of the names of above institutions or
- authors appear in advertising or endorsement of works derived from this
- software without specific prior written permission from all parties.
- .
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- DEALINGS IN THIS SOFTWARE.
+Copyright: 2015-2026 A. R. J. Nelson, Australian Nuclear Science and 
Technology Organisation
+License: BSD-3-clause
 
 Files: paper/*
 Copyright: 2018 A. R. J. Nelson, Australian Nuclear Science and Technology 
Organisation
@@ -31,6 +16,32 @@
 Copyright: 2023 Roland Mas <[email protected]>
 License: CC-Attribution-4.0-International
 
+License: BSD-3-clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ .
+ 1. Redistributions of source code must retain the above copyright notice, this
+    list of conditions and the following disclaimer.
+ .
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+ .
+ 3. Neither the name of the copyright holder nor the names of its contributors
+    may be used to endorse or promote products derived from this software
+    without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
 License: CC-Attribution-4.0-International
  Attribution 4.0 International
  .
diff -Nru refnx-0.1.66/debian/patches/0003-Disable-limited-API.patch 
refnx-0.1.66/debian/patches/0003-Disable-limited-API.patch
--- refnx-0.1.66/debian/patches/0003-Disable-limited-API.patch  1970-01-01 
01:00:00.000000000 +0100
+++ refnx-0.1.66/debian/patches/0003-Disable-limited-API.patch  2026-09-11 
17:52:44.000000000 +0200
@@ -0,0 +1,65 @@
+Description: Disable Python limited API
+ Disabling the limited API allows building against Python 3.15 and builds
+ extension modules tagged for each specific Python version.
+Forwarded: not-needed
+
+Index: refnx/pyproject.toml
+===================================================================
+--- refnx.orig/pyproject.toml
++++ refnx/pyproject.toml
+@@ -76,9 +76,6 @@ refnx = "refnx.reflect:main"
+ line-length = 79
+ extend-exclude="refnx/_lib/emcee/|refnx/_lib/ptemcee/|benchmarks"
+ 
+-[tool.meson-python]
+-limited-api=true
+-
+ 
+ [tool.ruff]
+ exclude = [
+Index: refnx/refnx/_lib/meson.build
+===================================================================
+--- refnx.orig/refnx/_lib/meson.build
++++ refnx/refnx/_lib/meson.build
+@@ -13,7 +13,6 @@ py3.extension_module(
+   '../../src/_cutil.pyx',
+   install: true,
+   subdir: 'refnx/_lib/', # Places it in my_package.submodules
+-  limited_api: '3.11'
+ )
+ 
+ install_subdir('emcee',
+Index: refnx/refnx/reduce/meson.build
+===================================================================
+--- refnx.orig/refnx/reduce/meson.build
++++ refnx/refnx/reduce/meson.build
+@@ -23,7 +23,6 @@ py3.extension_module(
+   include_directories: [inc_np],
+   dependencies: [np_dep],
+   subdir: 'refnx/reduce/', # Places it in my_package.submodules
+-  limited_api: '3.11'
+ )
+ 
+ install_subdir('tests',
+Index: refnx/refnx/reflect/meson.build
+===================================================================
+--- refnx.orig/refnx/reflect/meson.build
++++ refnx/refnx/reflect/meson.build
+@@ -47,7 +47,6 @@ py3.extension_module(
+   include_directories: [inc_np, '../../src', '../../src/pnr'],
+   dependencies: [np_dep],
+   subdir: 'refnx/reflect',
+-  limited_api: '3.11',
+   c_args: safer_args,
+   cpp_args: safer_args,
+ )
+@@ -66,8 +65,7 @@ if omp_dep.found()
+       override_options : ['cython_language=cpp'],
+       include_directories: [inc_np, '../../src', '../../src/pnr'],
+       dependencies: [np_dep, omp_dep],
+-      subdir: 'refnx/reflect',
+-      limited_api: '3.11'
++      subdir: 'refnx/reflect'
+     )
+ endif
+ 
diff -Nru refnx-0.1.66/debian/patches/series refnx-0.1.66/debian/patches/series
--- refnx-0.1.66/debian/patches/series  2026-08-01 08:14:01.000000000 +0200
+++ refnx-0.1.66/debian/patches/series  2026-09-11 17:52:44.000000000 +0200
@@ -1,2 +1,3 @@
 0001-Add-Makefile-to-build-paper-from-sources.patch
 0002-Fix-calculation-tolerance-on-i386.patch
+0003-Disable-limited-API.patch
diff -Nru refnx-0.1.66/debian/rules refnx-0.1.66/debian/rules
--- refnx-0.1.66/debian/rules   2026-08-01 08:14:01.000000000 +0200
+++ refnx-0.1.66/debian/rules   2026-09-11 17:52:44.000000000 +0200
@@ -9,6 +9,7 @@
 
 export PYBUILD_TEST_ARGS = -v -ra 
--deselect=refnx/reflect/tests/test_structure.py::TestStructure::test_to_from_orso
 --ignore=refnx/reflect/tests/test_jax.py
 export PYTEST_QT_API = PyQt6
+export MPLBACKEND = Agg
 
 
 %:

Reply via email to