%global modname jsmin
Name: python-%{modname}
Version: 2.2.2
Release: 4%{?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 Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jun 19 2018 Miro HronĨok <mhroncok@redhat.com> - 2.2.2-3
- Rebuilt for Python 3.7
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Sat Sep 09 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.2.2-1
- Initial package