%{?python_enable_dependency_generator} %global srcname cssselect2 %global py3_prefix python%{python3_pkgversion} Name: python-%{srcname} Version: 0.2.2 Release: 2%{?dist} Summary: CSS selectors for Python ElementTree License: BSD URL: https://%{srcname}.readthedocs.io/ BuildArch: noarch Source0: %pypi_source # 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} # upstream missed the "webencodings" dependency # see also: https://github.com/Kozea/cssselect2/pull/11 Requires: %{py3_prefix}-webencodings %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 # remove files which are only required for unit tests rm -rf %{buildroot}%{python3_sitelib}/%{srcname}/tests %files -n python3-%{srcname} %license LICENSE %doc CHANGES README.rst %{python3_sitelib}/%{srcname}/ %{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info/ %changelog * Fri Oct 25 2019 Felix Schwarz 0.2.2-2 - use sources from pypi, packaging fixes * Thu Oct 24 2019 Felix Schwarz 0.2.2-1 - update to new upstream version 0.2.2 * 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.