From af72f350bffe67521446edd05feda767dc9b8d53 Mon Sep 17 00:00:00 2001 From: Nicolas Graves Date: Thu, 23 Oct 2025 01:16:22 +0200 Subject: [PATCH] gnu: python-munkres: Switch to pyproject. * gnu/packages/python-xyz.scm (python-munkres): [build-system]: Switch to pyproject-build-system. [arguments]<#:phases>: Replace by <#:test-flags>. [native-inputs]: Add python-setuptools. [source, description]: Improve style. Change-Id: Id1187cdac229f56b3bd66e21c4900e3d9b241b3f Signed-off-by: Sharlatan Hellseher --- gnu/packages/python-xyz.scm | 40 ++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index a49d3e130f4fb7233f5b0014e052590e32c8dbdf..b54da9e88406b339edbad372a8166ae2e38137b7 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -21541,33 +21541,27 @@ main process so that they are handled correctly.") (package (name "python-munkres") (version "1.1.4") - (source (origin - (method url-fetch) - (uri (pypi-uri "munkres" version)) - (sha256 - (base32 - "00yvj8bxmhhhhd74v7j0x673is7vizmxwgb3dd5xmnkr74ybyi7w")))) + (source + (origin + (method url-fetch) + (uri (pypi-uri "munkres" version)) + (sha256 + (base32 "00yvj8bxmhhhhd74v7j0x673is7vizmxwgb3dd5xmnkr74ybyi7w")))) + (build-system pyproject-build-system) (arguments (list - #:phases - '(modify-phases %standard-phases - (add-after 'unpack 'disable-test - (lambda _ - ;; See https://github.com/bmc/munkres/issues/40 - (substitute* "test/test_munkres.py" - (("^def test_profit_float" m) - (string-append "\ -import platform -@pytest.mark.skipif(platform.architecture()[0] == \"32bit\", - reason=\"Fails on 32 bit architectures\") -" m)))))))) - (build-system python-build-system) - (native-inputs (list python-pytest)) + ;; See https://github.com/bmc/munkres/issues/40 + #:test-flags + (if (member (%current-system) %32bit-supported-systems) + #~(list "-k" "not test_profit_float") + #~(list)))) + (native-inputs (list python-pytest python-setuptools)) (home-page "https://software.clapper.org/munkres/") (synopsis "Implementation of the Munkres algorithm") - (description "The Munkres module provides an implementation of the Munkres -algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm), -useful for solving the Assignment Problem.") + (description + "The Munkres module provides an implementation of the Munkres algorithm +(also called the Hungarian algorithm or the Kuhn-Munkres algorithm), useful +for solving the Assignment Problem.") (license license:bsd-3))) (define-public python-codespell