summaryrefslogtreecommitdiff
path: root/dev-python/munkres
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2024-06-13 05:57:15 +0000
committerLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2024-06-13 05:57:15 +0000
commit461a07321892d56ea9dfb62c446c5952b8a4e1a1 (patch)
tree35c4722227824deb077469d19d8a25f2f1468e46 /dev-python/munkres
parentef69427bcfcf07fa2c728cbb22dce5ec457334a3 (diff)
downloadbaldeagleos-repo-461a07321892d56ea9dfb62c446c5952b8a4e1a1.tar.gz
baldeagleos-repo-461a07321892d56ea9dfb62c446c5952b8a4e1a1.tar.xz
baldeagleos-repo-461a07321892d56ea9dfb62c446c5952b8a4e1a1.zip
Adding metadata
Diffstat (limited to 'dev-python/munkres')
-rw-r--r--dev-python/munkres/files/munkres-1.1.4-test-32bit.patch34
-rw-r--r--dev-python/munkres/munkres-1.1.4-r1.ebuild7
2 files changed, 40 insertions, 1 deletions
diff --git a/dev-python/munkres/files/munkres-1.1.4-test-32bit.patch b/dev-python/munkres/files/munkres-1.1.4-test-32bit.patch
new file mode 100644
index 000000000000..86159299eed5
--- /dev/null
+++ b/dev-python/munkres/files/munkres-1.1.4-test-32bit.patch
@@ -0,0 +1,34 @@
+From 380a0d593a0569a761c4a035edaa4414c3b4b31d Mon Sep 17 00:00:00 2001
+From: Stefano Rivera <stefano@rivera.za.net>
+Date: Sat, 17 Oct 2020 11:15:04 -0700
+Subject: [PATCH] Use a constant cost calculation in test_profit_float()
+
+Rather than an architecture-specific calculation, when our variable
+precision does not differ across architectures.
+
+Fixes: #40
+---
+ test/test_munkres.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/test/test_munkres.py b/test/test_munkres.py
+index 23796dd..3cc65d9 100644
+--- a/test/test_munkres.py
++++ b/test/test_munkres.py
+@@ -162,13 +162,13 @@ def test_profit_float():
+ [37.11, 53.12, 57.13, 78.14, 28.15],
+ [59.16, 43.17, 97.18, 88.19, 48.2],
+ [52.21, 19.22, 89.23, 60.24, 60.25]]
+- import sys
++ max_ = 2**32
+ cost_matrix = munkres.make_cost_matrix(
+- profit_matrix, lambda cost: sys.maxsize - cost
++ profit_matrix, lambda cost: max_ - cost
+ )
+ indices = m.compute(cost_matrix)
+ profit = sum([profit_matrix[row][column] for row, column in indices])
+- assert profit == pytest.approx(362.65)
++ assert profit == pytest.approx(392.65)
+
+ def test_irregular():
+ matrix = [[12, 26, 17],
diff --git a/dev-python/munkres/munkres-1.1.4-r1.ebuild b/dev-python/munkres/munkres-1.1.4-r1.ebuild
index e1838949e2cd..84eec8351b07 100644
--- a/dev-python/munkres/munkres-1.1.4-r1.ebuild
+++ b/dev-python/munkres/munkres-1.1.4-r1.ebuild
@@ -22,6 +22,11 @@ S=${WORKDIR}/${MY_P}
LICENSE="Apache-2.0"
SLOT="0"
-KEYWORDS="amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
distutils_enable_tests pytest
+
+PATCHES=(
+ # https://github.com/bmc/munkres/pull/41
+ "${FILESDIR}/${P}-test-32bit.patch"
+)