%global pypi_name ruamel.ordereddict %global pname ruamel-ordereddict %if 0%{?fedora} # Disabling python 3 package as it is not ported to py3 %global with_python3 0 %endif Name: python-%{pname} Version: 0.4.9 Release: 1%{?dist} Summary: Ordered dictionary with Key Insertion Order License: MIT URL: https://bitbucket.org/ruamel/ordereddict Source0: https://files.pythonhosted.org/packages/source/r/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildRequires: python2-devel BuildRequires: python-setuptools BuildRequires: python3-devel BuildRequires: python3-setuptools %description This is an implementation of an ordered dictionary with Key Insertion Order (KIO: updates of values do not affect the position of the key), Key Value Insertion Order (KVIO, an existing key's position is removed and put at the back). The standard library module OrderedDict, implemented later, implements a subset of ordereddict functionality. %package -n python2-%{pname} Summary: Ordered dictionary with Key Insertion Order %{?python_provide:%python_provide python2-%{pname}} Requires: python2-setuptools %description -n python2-%{pname} This is an implementation of an ordered dictionary with Key Insertion Order (KIO: updates of values do not affect the position of the key), Key Value Insertion Order (KVIO, an existing key's position is removed and put at the back). The standard library module OrderedDict, implemented later, implements a subset of ordereddict functionality. %if 0%{?with_python3} %package -n python3-%{pname} Summary: Ordered dictionary with Key Insertion Order %{?python_provide:%python_provide python3-%{pname}} Requires: python3-setuptools %description -n python3-%{pname} This is an implementation of an ordered dictionary with Key Insertion Order (KIO: updates of values do not affect the position of the key), Key Value Insertion Order (KVIO, an existing key's position is removed and put at the back). The standard library module OrderedDict, implemented later, implements a subset of ordereddict functionality. %endif %prep %autosetup -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %build %py2_build %if 0%{?with_python3} %py3_build %endif %install %if 0%{?with_python3} %py3_install %endif %py2_install %files -n python2-%{pname} %doc README.rst %{python2_sitearch}/ruamel/ordereddict %{python2_sitearch}/%{pypi_name}-%{version}-py?.?-*.pth %{python2_sitearch}/%{pypi_name}-%{version}-py?.?.egg-info %{python2_sitearch}/_ordereddict.so %if 0%{?with_python3} %files -n python3-%{pname} %doc README.rst %{python3_sitearch}/ruamel/ordereddict %{python3_sitearch}/%{pypi_name}-%{version}-py?.?-*.pth %{python3_sitearch}/%{pypi_name}-%{version}-py?.?.egg-info %{python3_sitearch}/_ordereddict.so %endif %changelog * Fri Oct 14 2016 chandankumar - 0.4.9-1 - Initial package.