diff --git a/python-munkres.changes b/python-munkres.changes index 133d58b..f2d3ff7 100644 --- a/python-munkres.changes +++ b/python-munkres.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Apr 22 10:38:15 UTC 2022 - Matej Cepl + +- Add test_profil_float_32bit.patch to skip test_profil_float + test which fails on 32bit systems (gh#bmc/munkres#40). + ------------------------------------------------------------------- Sat Mar 26 19:58:13 UTC 2022 - Dirk Müller diff --git a/python-munkres.spec b/python-munkres.spec index 6ff8eac..b68f9fc 100644 --- a/python-munkres.spec +++ b/python-munkres.spec @@ -26,6 +26,9 @@ License: Apache-2.0 Group: Development/Languages/Python URL: https://software.clapper.org/munkres/ Source: https://github.com/bmc/munkres/archive/release-%{version}.tar.gz +# PATCH-{FIX|FEATURE}-{OPENSUSE|SLE|UPSTREAM} name-of-file.patch bsc#[0-9]+ mcepl@suse.com +# this patch makes things totally awesome +Patch0: test_profil_float_32bit.patch BuildRequires: %{python_module setuptools} # SECTION test requirements BuildRequires: %{python_module pytest} @@ -47,7 +50,7 @@ This particular implementation is based on http://csclab.murraystate.edu/~bob.pilgrim/445/munkres.html. %prep -%setup -q -n munkres-release-%{version} +%autosetup -p1 -n munkres-release-%{version} %build %python_build diff --git a/test_profil_float_32bit.patch b/test_profil_float_32bit.patch new file mode 100644 index 0000000..712fcb0 --- /dev/null +++ b/test_profil_float_32bit.patch @@ -0,0 +1,21 @@ +--- + test/test_munkres.py | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/test/test_munkres.py ++++ b/test/test_munkres.py +@@ -1,3 +1,5 @@ ++import platform ++ + from munkres import Munkres, DISALLOWED, UnsolvableMatrix + import munkres + import pytest +@@ -156,6 +158,8 @@ def test_profit(): + profit = sum([profit_matrix[row][column] for row, column in indices]) + assert profit == 392 + ++@pytest.mark.skipif(platform.architecture()[0] == "32bit", ++ reason="Doesn't work on 32bit systems, gh#bmc/munkres#40") + def test_profit_float(): + profit_matrix = [[94.01, 66.02, 100.03, 18.04, 48.05], + [51.06, 63.07, 97.08, 79.09, 11.1],