%global srcname cssselect2 %global py3_prefix python%{python3_pkgversion} Name: python-%{srcname} Version: 0.2.1 Release: 3%{?dist} Summary: CSS selectors for Python ElementTree License: BSD URL: https://%{srcname}.readthedocs.io/ BuildArch: noarch Source0: https://github.com/Kozea/%{srcname}/archive/%{version}/%{srcname}-%{version}.tar.gz # Fedora does not ship pytest's flake8/isort modules Patch0: %{name}-disable-flake8-isort-for-pytest.patch BuildRequires: %{py3_prefix}-devel BuildRequires: %{py3_prefix}-setuptools BuildRequires: %{py3_prefix}-pytest BuildRequires: %{py3_prefix}-pytest-cov BuildRequires: %{py3_prefix}-webencodings BuildRequires: %{py3_prefix}-tinycss2 %description cssselect2 is a straightforward implementation of CSS3 Selectors for markup documents (HTML, XML, etc.) that can be read by ElementTree-like parsers, including cElementTree, lxml, html5lib_, etc. %package -n python3-%{srcname} Summary: %{summary} %{?python_provide:%python_provide %{py3_prefix}-cssselect2} Requires: %{py3_prefix}-webencodings Requires: %{py3_prefix}-tinycss2 %description -n python3-%{srcname} cssselect2 is a straightforward implementation of CSS3 Selectors for markup documents (HTML, XML, etc.) that can be read by ElementTree-like parsers, including cElementTree, lxml, html5lib_, etc. %prep %autosetup -n %{srcname}-%{version} %build %py3_build %install %py3_install %check %{__python3} -m pytest -v %files -n python3-%{srcname} %license LICENSE %doc CHANGES README.rst %{python3_sitelib}/%{srcname}/ %{python3_sitelib}/%{srcname}-%{version}-py?.?.egg-info/ %changelog * Thu May 02 2019 Eric Smith 0.2.1-3 - Moved Requires to subpackage. Added python_provide. * Wed May 01 2019 Eric Smith 0.2.1-2 - Added missing BuildRequires and Requires. * Tue Apr 30 2019 Eric Smith 0.2.1-1 - Initial version.