%global pkgname yattag
%global desc Generate HTML or XML in a pythonic way
Name: python-%{pkgname}
Version: 1.9.2
Release: 1%{?dist}
Summary: Pure python alternative to web template engines
License: LGPLv2
URL: https://pypi.python.org/pypi/yattag
Source0: https://files.pythonhosted.org/packages/source/y/%{pkgname}/%{pkgname}-%{version}.tar.gz
BuildArch: noarch
%description
%{desc}
%package -n python2-%{pkgname}
BuildRequires: python2-devel
BuildRequires: python2-nose
Summary: %{summary}
%{?python_provide:%python_provide python2-%{pkgname}}
%description -n python2-%{pkgname}
%{desc}
%package -n python3-%{pkgname}
BuildRequires: python3-devel
BuildRequires: python3-nose
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} -m nose -v
%{__python3} -m nose -v
%files -n python2-%{pkgname}
%doc README.rst
%license license/COPYING
%{python2_sitelib}/%{pkgname}-%{version}-py%{python2_version}.egg-info
%{python2_sitelib}/yattag
%files -n python3-%{pkgname}
%doc README.rst
%license license/COPYING
%{python3_sitelib}/%{pkgname}-%{version}-py%{python3_version}.egg-info
%{python3_sitelib}/yattag
%changelog
* Mon Nov 06 2017 Sebastian Kisela - 1.9.2-1
- New upstream release 1.9.2
* Mon Oct 09 2017 skisela@redhat.com - 1.9.0-2
- Fix description macro. Reported at https://bugzilla.redhat.com/1498071.
* Wed Aug 23 2017 Sebastian Kisela - 1.9.0-1
- New upstream release 1.9.0
* Wed Jul 26 2017 Sebastian Kisela - 1.8.0-1
- Initial 1.8.0 package version.