%global pkgname ansicolors %global desc %{pkgname} adds support of ANSI colors for print standard output. Name: python-%{pkgname} Version: 1.1.8 Release: 1%{?dist} Summary: ANSI colors support for print output License: ISC URL: https://pypi.python.org/pypi/ansicolors Source0: https://files.pythonhosted.org/packages/source/a/%{pkgname}/%{pkgname}-%{version}.zip BuildArch: noarch %description %{desc} %package -n python2-%{pkgname} BuildRequires: python2-devel Requires: python2-tox Requires: python2-pytest Requires: python2-coverage Requires: python2-pytest-cov Summary: %{summary} %{?python_provide:%python_provide python2-%{pkgname}} %description -n python2-%{pkgname} %{desc} %package -n python3-%{pkgname} BuildRequires: python3-devel Requires: python3-tox Requires: python3-pytest Requires: python3-coverage Requires: python3-pytest-cov Summary: %{summary} %{?python_provide:%python_provide python3-%{pkgname}} %description -n python3-%{pkgname} %{desc} %prep %autosetup -n %{pkgname}-%{version} # Remove upstream egg-info rm -rf %{pkgname}.egg-info %build %py2_build %py3_build %install %py2_install %py3_install %check %{__python2} setup.py test %{__python3} setup.py test %files -n python2-%{pkgname} %doc README.rst %license LICENSE %{python2_sitelib}/%{pkgname}-%{version}-py%{python2_version}.egg-info %{python2_sitelib}/colors %files -n python3-%{pkgname} %doc README.rst %license LICENSE %{python3_sitelib}/%{pkgname}-%{version}-py%{python3_version}.egg-info %{python3_sitelib}/colors %changelog * Fri Jul 14 2017 Sebastian Kisela - 1.1.8-1 - Initial 1.1.8 package version