3 %bcond_without tests # unit tests
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 Summary: Munkres algorithm for the Assignment Problem
8 Summary(pl.UTF-8): Algorytm Munkresa rozwiązywania problemu przypisania
13 Group: Libraries/Python
14 #Source0: https://files.pythonhosted.org/packages/source/m/munkres/munkres-%{version}.tar.gz
15 #Source0Download: https://github.com/bmc/munkres/releases/
16 Source0: https://github.com/bmc/munkres/archive/release-%{version}/munkres-%{version}.tar.gz
17 # Source0-md5: 81314d256b5e3de565b5143be333cdf2
18 URL: https://pypi.python.org/pypi/munkres
19 BuildRequires: rpm-pythonprov
20 BuildRequires: rpmbuild(macros) >= 1.714
22 BuildRequires: python-modules >= 2.0
23 %{?with_tests:BuildRequires: python-nose >= 1.3.7}
24 BuildRequires: python-setuptools
27 BuildRequires: python3-modules >= 1:3.2
28 %{?with_tests:BuildRequires: python3-nose >= 1.3.7}
29 BuildRequires: python3-setuptools
31 Requires: python-modules >= 2.0
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 The Munkres module provides an O(n^3) implementation of the Munkres
37 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres
38 algorithm). The algorithm models an assignment problem as an NxM cost
39 matrix, where each element represents the cost of assigning the ith
40 worker to the jth job, and it figures out the least-cost solution,
41 choosing a single item from each row and column in the matrix, such
42 that no row and no column are used more than once.
44 %description -l pl.UTF-8
45 Moduł Munkres zawiera implementację O(n^3) algorytmu Munkresa (zwanego
46 także algorytmem węgierskim lub algorytmem Kuhna-Munkresa). Algorytm
47 modeluje problem przypisania jako macierz kosztu NxM, gdzie każdy
48 element reprezentuje koszt przypisania i-tego pracownika do j-tego
49 zadania i wyznacza rozwiązanie o najmniejszym koszcie, wybierając
50 pojedynczy element z każdego wiersza i kolumny macierzy tak, żeby
51 żaden wiersz ani kolumna nie były użyte więcej niż raz.
53 %package -n python3-munkres
54 Summary: Munkres algorithm for the Assignment Problem
55 Summary(pl.UTF-8): Algorytm Munkresa rozwiązywania problemu przypisania
56 Group: Libraries/Python
57 Requires: python3-modules >= 1:3.2
59 %description -n python3-munkres
60 The Munkres module provides an O(n^3) implementation of the Munkres
61 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres
62 algorithm). The algorithm models an assignment problem as an NxM cost
63 matrix, where each element represents the cost of assigning the ith
64 worker to the jth job, and it figures out the least-cost solution,
65 choosing a single item from each row and column in the matrix, such
66 that no row and no column are used more than once.
68 %description -n python3-munkres -l pl.UTF-8
69 Moduł Munkres zawiera implementację O(n^3) algorytmu Munkresa (zwanego
70 także algorytmem węgierskim lub algorytmem Kuhna-Munkresa). Algorytm
71 modeluje problem przypisania jako macierz kosztu NxM, gdzie każdy
72 element reprezentuje koszt przypisania i-tego pracownika do j-tego
73 zadania i wyznacza rozwiązanie o najmniejszym koszcie, wybierając
74 pojedynczy element z każdego wiersza i kolumny macierzy tak, żeby
75 żaden wiersz ani kolumna nie były użyte więcej niż raz.
78 %setup -q -n munkres-release-%{version}
84 %{?with_tests:nosetests-%{py_ver} test}
90 %{?with_tests:nosetests-%{py3_ver} test}
94 rm -rf $RPM_BUILD_ROOT
107 rm -rf $RPM_BUILD_ROOT
111 %defattr(644,root,root,755)
112 %doc CHANGELOG.md LICENSE.md README.md
113 %{py_sitescriptdir}/munkres.py[co]
114 %{py_sitescriptdir}/munkres-%{version}-py*.egg-info
118 %files -n python3-munkres
119 %defattr(644,root,root,755)
120 %doc CHANGELOG.md LICENSE.md README.md
121 %{py3_sitescriptdir}/munkres.py
122 %{py3_sitescriptdir}/__pycache__/munkres.cpython-*.py[co]
123 %{py3_sitescriptdir}/munkres-%{version}-py*.egg-info