Package: src:mdanse
Version: 2.0.1-2
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 mdanse fails to build from source [1].

The error is:

E   ImportError: cannot import name 'rdBase' from partially initialized module 
'rdkit' (most likely due to a circular import) 
(/usr/lib/python3/dist-packages/rdkit/__init__.py

This happened because rdkit is only building against the default Python
version (3.14 in this case), while mdanse is trying to build against all
versions.

However, while looking into this I realized that there's no reason this
package should be arch:any, it should be arch:all instead. Switching to
arch:all and dropping the unused related dependencies makes the package
build successfully.

In the process of looking into this issue, I also ran into a test error
tolerance problem when building in arm64. By moving to arch:all that
issue will likely not be visible, but it's still good to make it
possible to build mdanse on arm64.

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/4749251/
[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 --git a/debian/changelog b/debian/changelog
index 8ba5fe50..9eb0010c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+mdanse (2.0.1-3) UNRELEASED; urgency=medium
+
+  * Team upload.
+  * Build python3-mdanse as arch:all
+  * Add patch to relax the test tolerance
+
+ -- Maximiliano Curia <[email protected]>  Fri, 18 Sep 2026 11:46:02 +0200
+
 mdanse (2.0.1-2) unstable; urgency=medium
 
   * Fix d/copyright syntax.
diff --git a/debian/control b/debian/control
index 534e72f7..9b5208e9 100644
--- a/debian/control
+++ b/debian/control
@@ -7,11 +7,9 @@ Section: science
 Build-Depends:
  debhelper-compat (= 13),
  dh-sequence-python3,
- cython3,
  dbus-daemon <!nocheck>,
  pybuild-plugin-pyproject,
  python3-all,
- python3-all-dev,
  python3-ase <!nocheck>,
  python3-h5py <!nocheck>,
  python3-mdanalysis,
@@ -33,12 +31,11 @@ Vcs-Git: https://salsa.debian.org/science-team/mdanse.git
 
 Package: python3-mdanse
 Section: python
-Architecture: any
+Architecture: all
 Depends:
  python3-rdkit (>= 202503.1-5~),
  ${misc:Depends},
  ${python3:Depends},
- ${shlibs:Depends},
  python3-vtk9,
 Description: Molecular Dynamics Analysis for Neutron Scattering Experiments
  This is the module containing the command-line utilities and
diff --git a/debian/patches/relax-test-tolerance.patch b/debian/patches/relax-test-tolerance.patch
new file mode 100644
index 00000000..4624547f
--- /dev/null
+++ b/debian/patches/relax-test-tolerance.patch
@@ -0,0 +1,19 @@
+Description: Relax tolerance for DynamicCoherentStructureFactor test
+ On architectures such as arm64, floating point differences cause a maximum
+ absolute difference of ~1.1e-5 in the ideal DCSF dataset, which slightly
+ exceeds the atol=1e-5 tolerance. Relax atol to 2e-5.
+Author: Maximiliano Curia <[email protected]>
+Forwarded: no
+Last-Update: 2026-09-18
+
+--- a/MDANSE/Tests/UnitTests/Analysis/test_grouping.py
++++ b/MDANSE/Tests/UnitTests/Analysis/test_grouping.py
+@@ -113,7 +113,7 @@
+         ("PairDistributionFunction", ["pdf", "rdf", "tcf"], "equal", 1e-10, 1e-7),
+         ("StaticStructureFactor", ["ssf"], "equal", 1e-10, 1e-7),
+         ("XRayStaticStructureFactor", ["xssf"], "equal", 1e-10, 1e-7),
+-        ("DynamicCoherentStructureFactor", ["dcsf"], "b_coherent", 1e-5, 1e-4),
++        ("DynamicCoherentStructureFactor", ["dcsf"], "b_coherent", 2e-5, 1e-4),
+         ("CurrentCorrelationFunction", ["ccf"], "b_coherent", 1e-6, 1e-7),
+         ("DynamicIncoherentStructureFactor", ["disf"], "b_incoherent", 1e-10, 1e-7),
+         ("ElasticIncoherentStructureFactor", ["eisf"], "b_incoherent", 1e-10, 1e-7),
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 00000000..cab0e035
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+relax-test-tolerance.patch
-- 
debian-science-maintainers mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-maintainers

Reply via email to