%global srcname munkres %if 0%{?fedora} %bcond_without python3 %else %bcond_with python3 %endif Name: python-%{srcname} Version: 1.0.8 Release: 1%{?dist} Summary: A Munkres algorithm for Python License: BSD URL: http://software.clapper.org/munkres/ Source0: https://files.pythonhosted.org/packages/source/m/%{srcname}/%{srcname}-%{version}.tar.gz Buildarch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools %if %{with python3} BuildRequires: python3-devel BuildRequires: python3-setuptools %endif %description The Munkres module provides an 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 ith worker to the jth 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. %package -n python2-%{srcname} Summary: %{summary} Requires: python2 BuildArch: noarch %{?python_provide:%python_provide python2-%{srcname}} %description -n python2-%{srcname} The Munkres module provides an 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 ith worker to the jth 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. %if %{with python3} %package -n python3-%{srcname} Summary: %{summary} Requires: python3 BuildArch: noarch %{?python_provide:%python_provide python3-%{srcname}} %description -n python3-%{srcname} The Munkres module provides an 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 ith worker to the jth 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. %endif %prep %autosetup -n %{srcname}-%{version} %build %py2_build %if %{with python3} %py3_build %endif %install %py2_install %if %{with python3} %py3_install %endif %files -n python2-%{srcname} %doc CHANGELOG %license LICENSE %{python2_sitelib}/%{srcname}.py* %{python2_sitelib}/%{srcname}*.egg-info %if %{with python3} %files -n python3-%{srcname} %doc CHANGELOG %license LICENSE %{python3_sitelib}/%{srcname}.py* %{python3_sitelib}/%{srcname}*.egg-info %{python3_sitelib}/__pycache__/%{srcname}* %endif %changelog * Tue Nov 15 2016 Fabian Affolter - 1.0.8-1 - Update to latest upstream release 1.0.8 * Tue Jul 19 2016 Fedora Release Engineering - 1.0.7-5 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Thu Feb 04 2016 Fedora Release Engineering - 1.0.7-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Tue Nov 10 2015 Fedora Release Engineering - 1.0.7-3 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 * Thu Jun 18 2015 Fedora Release Engineering - 1.0.7-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sun Mar 15 2015 Fabian Affolter - 1.0.7-1 - Update spec file - Update to latest upstream release 1.0.7 * Fri Sep 13 2013 Ian Weller - 1.0.5.4-1 - Initial package build