2017-04-20 05:44:56 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-munkres
|
|
|
|
#
|
2023-03-15 14:34:29 +00:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2017-04-20 05:44:56 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2018-12-04 13:41:42 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-04-20 05:44:56 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2019-04-01 12:28:29 +00:00
|
|
|
%define skip_python2 1
|
2023-04-21 14:21:03 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
2017-04-20 05:44:56 +00:00
|
|
|
Name: python-munkres
|
2022-03-26 19:59:45 +00:00
|
|
|
Version: 1.1.4
|
2017-04-20 05:44:56 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Munkres implementation for Python
|
|
|
|
License: Apache-2.0
|
|
|
|
Group: Development/Languages/Python
|
2022-03-26 19:59:45 +00:00
|
|
|
URL: https://software.clapper.org/munkres/
|
2017-04-20 05:44:56 +00:00
|
|
|
Source: https://github.com/bmc/munkres/archive/release-%{version}.tar.gz
|
2023-03-15 14:34:29 +00:00
|
|
|
# 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
|
2022-04-22 10:38:59 +00:00
|
|
|
Patch0: test_profil_float_32bit.patch
|
2023-03-15 14:34:29 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
|
|
|
BuildRequires: %{python_module wheel}
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
BuildArch: noarch
|
2019-04-01 12:28:29 +00:00
|
|
|
# SECTION test requirements
|
2020-09-15 06:57:40 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2019-04-01 12:28:29 +00:00
|
|
|
# /SECTION
|
2017-04-20 05:44:56 +00:00
|
|
|
%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
|
2022-04-22 10:38:59 +00:00
|
|
|
%autosetup -p1 -n munkres-release-%{version}
|
2017-04-20 05:44:56 +00:00
|
|
|
|
|
|
|
%build
|
2023-03-15 14:34:29 +00:00
|
|
|
%pyproject_wheel
|
2017-04-20 05:44:56 +00:00
|
|
|
|
|
|
|
%install
|
2023-03-15 14:34:29 +00:00
|
|
|
%pyproject_install
|
2018-12-06 17:27:33 +00:00
|
|
|
%{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
|
|
|
|
}
|
2017-04-20 05:44:56 +00:00
|
|
|
|
2019-04-01 12:28:29 +00:00
|
|
|
%check
|
2020-09-15 06:57:40 +00:00
|
|
|
%pytest
|
2019-04-01 12:28:29 +00:00
|
|
|
|
2017-04-20 05:44:56 +00:00
|
|
|
%files %{python_files}
|
2019-04-01 12:28:29 +00:00
|
|
|
%license LICENSE.md
|
2018-12-04 17:17:06 +00:00
|
|
|
%doc CHANGELOG.md README.md
|
2023-03-15 14:34:29 +00:00
|
|
|
%pycache_only %{python_sitelib}/__pycache__/munkres.*.pyc
|
|
|
|
%{python_sitelib}/munkres.py
|
|
|
|
%{python_sitelib}/munkres-%{version}*-info
|
2017-04-20 05:44:56 +00:00
|
|
|
|
|
|
|
%changelog
|