%global modname jsmin Name: python-%{modname} Version: 2.2.2 Release: 1%{?dist} Summary: JavaScript minifier License: MIT URL: https://pypi.python.org/pypi/jsmin Source0: https://files.pythonhosted.org/packages/source/%(n=%{modname}; echo ${n:0:1})/%{modname}/%{modname}-%{version}.tar.gz BuildArch: noarch %description %{summary}. %package -n python2-%{modname} Summary: %{summary} %{?python_provide:%python_provide python2-%{modname}} BuildRequires: python2-devel BuildRequires: python2-setuptools %description -n python2-%{modname} %{summary}. 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} %{summary}. Python 3 version. %prep %autosetup -n %{modname}-%{version} %build %py2_build %py3_build %install %py2_install %py3_install %check %{__python2} setup.py test %{__python3} setup.py test %files -n python2-%{modname} %license LICENSE.txt %doc README.rst CHANGELOG.txt %{python2_sitelib}/%{modname}/ %{python2_sitelib}/%{modname}-*.egg-info/ %files -n python3-%{modname} %license LICENSE.txt %doc README.rst CHANGELOG.txt %{python3_sitelib}/%{modname}/ %{python3_sitelib}/%{modname}-*.egg-info/ %changelog * Sat Sep 09 2017 Igor Gnatenko - 2.2.2-1 - Initial package