Sync from SUSE:SLFO:Main python-munkres revision 1cbc747113294b884cc0397c69247dec
This commit is contained in:
commit
f087f03bc6
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
72
python-munkres.changes
Normal file
72
python-munkres.changes
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Apr 21 12:28:22 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- add sle15_python_module_pythons (jsc#PED-68)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Apr 13 22:42:40 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Make calling of %{sle15modernpython} optional.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Feb 15 23:34:39 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Clean up spec
|
||||||
|
- Fix metadata for the added patch.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Apr 22 10:38:15 UTC 2022 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- 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 <dmueller@suse.com>
|
||||||
|
|
||||||
|
- update to 1.1.4:
|
||||||
|
- Switched from Nose to Pytest for testing.
|
||||||
|
- Fix to Issue #34, in which
|
||||||
|
`print_matrix` wasn't handling non-integral values.
|
||||||
|
- Various changes from `http:` URLs to `https:` URLs
|
||||||
|
- drop python-munkres-remove-nose.patch (obsolete)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Sep 14 19:32:25 UTC 2020 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- do not depend on deprecated nose
|
||||||
|
- added patches
|
||||||
|
fix https://github.com/bmc/munkres/pull/32
|
||||||
|
+ python-munkres-remove-nose.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 1 08:57:28 UTC 2019 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- version update to 1.1.2
|
||||||
|
* Removed `NoReturn` type annotations
|
||||||
|
* Only supports Python 3.5 or better
|
||||||
|
* Added `typing` type hints
|
||||||
|
* simplify conversion of a profit matrix to a cost matrix
|
||||||
|
* Added more tests
|
||||||
|
- run the testsuite
|
||||||
|
- python3-only package
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Dec 4 12:50:37 UTC 2018 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Remove superfluous devel dependency for noarch package
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 10 08:13:03 UTC 2017 - alarrosa@suse.com
|
||||||
|
|
||||||
|
- Use singlespec macros
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Feb 21 13:12:51 UTC 2017 - jengelh@inai.de
|
||||||
|
|
||||||
|
- Wrap description
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jan 20 06:58:47 UTC 2017 - alarrosa@suse.com
|
||||||
|
|
||||||
|
- Initial release
|
||||||
|
|
78
python-munkres.spec
Normal file
78
python-munkres.spec
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
#
|
||||||
|
# spec file for package python-munkres
|
||||||
|
#
|
||||||
|
# Copyright (c) 2023 SUSE LLC
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%define skip_python2 1
|
||||||
|
%{?sle15_python_module_pythons}
|
||||||
|
Name: python-munkres
|
||||||
|
Version: 1.1.4
|
||||||
|
Release: 0
|
||||||
|
Summary: Munkres implementation for Python
|
||||||
|
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-UPSTREAM test_profil_float_32bit.patch gh#bmc/munkres#40 mcepl@suse.com
|
||||||
|
# skip test_profit_float on 32bit archs, where it fails
|
||||||
|
Patch0: test_profil_float_32bit.patch
|
||||||
|
BuildRequires: %{python_module pip}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
|
BuildRequires: python-rpm-macros
|
||||||
|
BuildArch: noarch
|
||||||
|
# SECTION test requirements
|
||||||
|
BuildRequires: %{python_module pytest}
|
||||||
|
# /SECTION
|
||||||
|
%python_subpackages
|
||||||
|
|
||||||
|
%description
|
||||||
|
The Munkres module provides an O(n^3) implementation of the Munkres
|
||||||
|
algorithm (also called the Hungarian algorithm or the Kuhn-Munkres
|
||||||
|
algorithm). The algorithm models an assignment problem as an NxM cost
|
||||||
|
matrix, where each element represents the cost of assigning the i'th
|
||||||
|
worker to the j'th job, and it figures out the least-cost solution,
|
||||||
|
choosing a single item from each row and column in the matrix, such
|
||||||
|
that no row and no column are used more than once.
|
||||||
|
|
||||||
|
This particular implementation is based on
|
||||||
|
http://csclab.murraystate.edu/~bob.pilgrim/445/munkres.html.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p1 -n munkres-release-%{version}
|
||||||
|
|
||||||
|
%build
|
||||||
|
%pyproject_wheel
|
||||||
|
|
||||||
|
%install
|
||||||
|
%pyproject_install
|
||||||
|
%{python_expand \
|
||||||
|
sed -i -e '/^#\/usr\/bin\/env/d' %{buildroot}%{$python_sitelib}/munkres.py
|
||||||
|
$python -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/munkres.py
|
||||||
|
$python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/munkres.py
|
||||||
|
chmod -x %{buildroot}%{$python_sitelib}/munkres.py
|
||||||
|
}
|
||||||
|
|
||||||
|
%check
|
||||||
|
%pytest
|
||||||
|
|
||||||
|
%files %{python_files}
|
||||||
|
%license LICENSE.md
|
||||||
|
%doc CHANGELOG.md README.md
|
||||||
|
%pycache_only %{python_sitelib}/__pycache__/munkres.*.pyc
|
||||||
|
%{python_sitelib}/munkres.py
|
||||||
|
%{python_sitelib}/munkres-%{version}*-info
|
||||||
|
|
||||||
|
%changelog
|
BIN
release-1.1.4.tar.gz
(Stored with Git LFS)
Normal file
BIN
release-1.1.4.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
21
test_profil_float_32bit.patch
Normal file
21
test_profil_float_32bit.patch
Normal file
@ -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],
|
Loading…
Reference in New Issue
Block a user