]> git.pld-linux.org Git - packages/python-munkres.git/blob - python-munkres.spec
rebuild with python 3.10
[packages/python-munkres.git] / python-munkres.spec
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
7 Summary:        Munkres algorithm for the Assignment Problem
8 Summary(pl.UTF-8):      Algorytm Munkresa rozwiązywania problemu przypisania
9 Name:           python-munkres
10 Version:        1.0.12
11 Release:        7
12 License:        Apache v2.0
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
21 %if %{with python2}
22 BuildRequires:  python-modules >= 2.0
23 %{?with_tests:BuildRequires:    python-nose >= 1.3.7}
24 BuildRequires:  python-setuptools
25 %endif
26 %if %{with python3}
27 BuildRequires:  python3-modules >= 1:3.2
28 %{?with_tests:BuildRequires:    python3-nose >= 1.3.7}
29 BuildRequires:  python3-setuptools
30 %endif
31 Requires:       python-modules >= 2.0
32 BuildArch:      noarch
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
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.
43
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.
52
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
58
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.
67
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.
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
94 rm -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
107 rm -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.095379 seconds and 3 git commands to generate.