%global pypi_name dominate %global _description\ Dominate is a Python library for creating and manipulating HTML\ documents using an elegant DOM API. It allows you to write HTML\ pages in pure Python very concisely, which eliminates the need\ to learn another template language, and lets you take advantage\ of the more powerful features of Python. Name: python-%{pypi_name} Version: 2.3.1 Release: 1%{?dist} Summary: Dominate is a Python library for HTML documents License: GPLv3 URL: http://github.com/Knio/dominate/ Source0: https://files.pythonhosted.org/packages/source/d/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-setuptools BuildRequires: python2-devel BuildRequires: python2-pytest BuildRequires: python3-setuptools BuildRequires: python3-devel BuildRequires: python3-pytest %description %_description %package -n python2-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python2-%{pypi_name}} %description -n python2-%{pypi_name} %_description %package -n python3-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python3-%{pypi_name}} %description -n python3-%{pypi_name} %_description %prep %autosetup -n %{pypi_name}-%{version} rm -rf %{pypi_name}.egg-info %build %py2_build %py3_build %install %py3_install %py2_install %check %{__python2} -m pytest tests %{__python3} -m pytest tests %files -n python2-%{pypi_name} %license LICENSE.txt %doc README.md %{python2_sitelib}/%{pypi_name} %{python2_sitelib}/%{pypi_name}-%{version}-py*egg-info %files -n python3-%{pypi_name} %license LICENSE.txt %doc README.md %{python3_sitelib}/%{pypi_name} %{python3_sitelib}/%{pypi_name}-%{version}-py*egg-info %changelog * Tue Jul 04 2017 David Hannequin - 2.3.1-1 - Initial package.