%global pypi_name marrow.util %global srcname marrow-util %global modname marrow %global desc Marrow utilities collection contains many commonly \ re-implemented utility classes and functions. Name: python-%{srcname} Version: 1.2.3 Release: 1%{?dist} Summary: A collection of many commonly re-implemented utility classes and functions License: MIT URL: https://github.com/%{modname}/util Source0: https://files.pythonhosted.org/packages/source/m/%{pypi_name}/%{pypi_name}-%{version}.tar.gz Source1: https://raw.githubusercontent.com/%{modname}/util/master/LICENSE Source2: https://raw.githubusercontent.com/%{modname}/util/master/README.textile BuildArch: noarch %description %{desc} %package -n python2-%{srcname} BuildRequires: python2-coverage BuildRequires: python2-nose BuildRequires: python2-setuptools BuildRequires: python2-devel Summary: %{summary} %{?python_provide:%python_provide python2-%{srcname}} %description -n python2-%{srcname} %{desc} %package -n python3-%{srcname} BuildRequires: python3-coverage BuildRequires: python3-nose BuildRequires: python3-setuptools BuildRequires: python3-devel Summary: %{summary} %{?python_provide:%python_provide python3-%{srcname}} %description -n python3-%{srcname} %{desc} %prep %autosetup -n %{pypi_name}-%{version} # Docs and license from other source cp -p %{SOURCE1} LICENSE cp -p %{SOURCE2} README.textile # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %build %py2_build %py3_build %install %py2_install %py3_install %check # PyPI package doesn't contains tests %files -n python2-%{srcname} %doc README.textile %license LICENSE %{python2_sitelib}/%{modname} %{python2_sitelib}/%{pypi_name}-%{version}-py%{python2_version}-*.pth %{python2_sitelib}/%{pypi_name}-%{version}-py%{python2_version}.egg-info %files -n python3-%{srcname} %doc README.textile %license LICENSE %{python3_sitelib}/%{modname} %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}-*.pth %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog * Mon Jul 25 2016 Lumir Balhar - 1.2.3-1 - Initial package.