%global modname frozendict Name: python-%{modname} Version: 1.2 Release: 1%{?dist} Summary: An immutable dictionary License: MIT URL: https://pypi.python.org/pypi/frozendict Source0: https://files.pythonhosted.org/packages/source/%(n=%{modname}; echo ${n:0:1})/%{modname}/%{modname}-%{version}.tar.gz BuildArch: noarch %global _description \ frozendict is an immutable wrapper around dictionaries that implements\ the complete mapping interface. It can be used as a drop-in replacement\ for dictionaries where immutability is desired. %description %{_description} %package -n python2-%{modname} Summary: %{summary} %{?python_provide:%python_provide python2-%{modname}} BuildRequires: python2-devel BuildRequires: python2-setuptools %description -n python2-%{modname} %{_description} Python 2 version. %package -n python3-%{modname} Summary: %{summary} %{?python_provide:%python_provide python3-%{modname}} BuildRequires: python3-devel BuildRequires: python3-setuptools %description -n python3-%{modname} %{_description} Python 3 version. %prep %autosetup -n %{modname}-%{version} %build %py2_build %py3_build %install %py2_install %py3_install %files -n python2-%{modname} %license LICENSE.txt %doc README.rst %{python2_sitelib}/%{modname}-*.egg-info/ %{python2_sitelib}/%{modname}/ %files -n python3-%{modname} %license LICENSE.txt %doc README.rst %{python3_sitelib}/%{modname}-*.egg-info/ %{python3_sitelib}/%{modname}/ %changelog * Mon Dec 19 2016 Igor Gnatenko - 1.2-1 - Initial package