]> git.pld-linux.org Git - packages/python-munkres.git/blame - python-munkres.spec
rebuild with python 3.10
[packages/python-munkres.git] / python-munkres.spec
CommitLineData
65a7ee43
JB
1#
2# Conditional build:
3%bcond_without tests # unit tests
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7Summary: Munkres algorithm for the Assignment Problem
8Summary(pl.UTF-8): Algorytm Munkresa rozwiązywania problemu przypisania
9Name: python-munkres
10Version: 1.0.12
a89c4946 11Release: 7
65a7ee43
JB
12License: Apache v2.0
13Group: Libraries/Python
14#Source0: https://files.pythonhosted.org/packages/source/m/munkres/munkres-%{version}.tar.gz
15#Source0Download: https://github.com/bmc/munkres/releases/
16Source0: https://github.com/bmc/munkres/archive/release-%{version}/munkres-%{version}.tar.gz
17# Source0-md5: 81314d256b5e3de565b5143be333cdf2
18URL: https://pypi.python.org/pypi/munkres
19BuildRequires: rpm-pythonprov
20BuildRequires: rpmbuild(macros) >= 1.714
21%if %{with python2}
22BuildRequires: python-modules >= 2.0
23%{?with_tests:BuildRequires: python-nose >= 1.3.7}
24BuildRequires: python-setuptools
25%endif
26%if %{with python3}
27BuildRequires: python3-modules >= 1:3.2
28%{?with_tests:BuildRequires: python3-nose >= 1.3.7}
29BuildRequires: python3-setuptools
30%endif
31Requires: python-modules >= 2.0
32BuildArch: noarch
33BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35%description
36The Munkres module provides an O(n^3) implementation of the Munkres
37algorithm (also called the Hungarian algorithm or the Kuhn-Munkres
38algorithm). The algorithm models an assignment problem as an NxM cost
39matrix, where each element represents the cost of assigning the ith
40worker to the jth job, and it figures out the least-cost solution,
41choosing a single item from each row and column in the matrix, such
42that no row and no column are used more than once.
43
44%description -l pl.UTF-8
45Moduł Munkres zawiera implementację O(n^3) algorytmu Munkresa (zwanego
46także algorytmem węgierskim lub algorytmem Kuhna-Munkresa). Algorytm
47modeluje problem przypisania jako macierz kosztu NxM, gdzie każdy
48element reprezentuje koszt przypisania i-tego pracownika do j-tego
49zadania i wyznacza rozwiązanie o najmniejszym koszcie, wybierając
50pojedynczy element z każdego wiersza i kolumny macierzy tak, żeby
51żaden wiersz ani kolumna nie były użyte więcej niż raz.
52
53%package -n python3-munkres
54Summary: Munkres algorithm for the Assignment Problem
55Summary(pl.UTF-8): Algorytm Munkresa rozwiązywania problemu przypisania
56Group: Libraries/Python
57Requires: python3-modules >= 1:3.2
58
59%description -n python3-munkres
60The Munkres module provides an O(n^3) implementation of the Munkres
61algorithm (also called the Hungarian algorithm or the Kuhn-Munkres
62algorithm). The algorithm models an assignment problem as an NxM cost
63matrix, where each element represents the cost of assigning the ith
64worker to the jth job, and it figures out the least-cost solution,
65choosing a single item from each row and column in the matrix, such
66that no row and no column are used more than once.
67
68%description -n python3-munkres -l pl.UTF-8
69Moduł Munkres zawiera implementację O(n^3) algorytmu Munkresa (zwanego
70także algorytmem węgierskim lub algorytmem Kuhna-Munkresa). Algorytm
71modeluje problem przypisania jako macierz kosztu NxM, gdzie każdy
72element reprezentuje koszt przypisania i-tego pracownika do j-tego
73zadania i wyznacza rozwiązanie o najmniejszym koszcie, wybierając
74pojedynczy element z każdego wiersza i kolumny macierzy tak, żeby
75żaden wiersz ani kolumna nie były użyte więcej niż raz.
76
77%prep
78%setup -q -n munkres-release-%{version}
79
80%build
81%if %{with python2}
82%py_build
83
84%{?with_tests:nosetests-%{py_ver} test}
85%endif
86
87%if %{with python3}
88%py3_build
89
90%{?with_tests:nosetests-%{py3_ver} test}
91%endif
92
93%install
94rm -rf $RPM_BUILD_ROOT
95
96%if %{with python2}
97%py_install
98
99%py_postclean
100%endif
101
102%if %{with python3}
103%py3_install
104%endif
105
106%clean
107rm -rf $RPM_BUILD_ROOT
108
109%if %{with python2}
110%files
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
115%endif
116
117%if %{with python3}
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
124%endif
This page took 0.58344 seconds and 4 git commands to generate.