%bcond_without check %global modname pydenticon Name: python-%{modname} Version: 0.3 Release: 1%{?dist} Summary: Library for generating identicons License: BSD URL: https://github.com/azaghal/pydenticon Source0: %{url}/archive/%{version}/%{modname}-%{version}.tar.gz BuildArch: noarch %global _description \ Pydenticon is a small utility library that can be used for deterministically\ enerating identicons based on the hash of provided data. %description %{_description} %package -n python2-%{modname} Summary: %{summary} %{?python_provide:%python_provide python2-%{modname}} BuildRequires: python2-devel BuildRequires: python2-setuptools %if %{with check} BuildRequires: python2-mock BuildRequires: python2-pillow %endif Requires: python2-pillow %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 %if %{with check} BuildRequires: python3-mock BuildRequires: python3-pillow %endif Requires: python3-pillow %description -n python3-%{modname} %{_description} Python 3 version. %prep %autosetup -n %{modname}-%{version} %build %py2_build %py3_build %install %py2_install %py3_install %if %{with check} %check %{__python2} setup.py test %{__python3} setup.py test %endif %files -n python2-%{modname} %license LICENSE %doc README.rst %{python2_sitelib}/%{modname}-*.egg-info/ %{python2_sitelib}/%{modname}/ %files -n python3-%{modname} %license LICENSE %doc README.rst %{python3_sitelib}/%{modname}-*.egg-info/ %{python3_sitelib}/%{modname}/ %changelog * Mon Dec 19 2016 Igor Gnatenko - 0.3-1 - Initial package