%global _python_bytecompile_errors_terminate_build 0 %global commit 5800210e9957793f1126578bbcbeeded8e426760 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global date 20200320 %global pypi_name readability-lxml Name: python-%{pypi_name} Version: 0.7.1 Release: 1.%{date}git%{shortcommit}%{?dist} Summary: Fast html to text parser (article readability tool) # https://github.com/buriy/python-readability/pull/142 License: ASL 2.0 URL: https://github.com/buriy/python-readability Source0: %{url}/archive/%{commit}/%{name}-%{version}.%{date}git%{shortcommit}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3dist(chardet) BuildRequires: python3dist(cssselect) BuildRequires: python3dist(lxml) BuildRequires: python3dist(pytest) BuildRequires: python3dist(setuptools) BuildRequires: python3dist(timeout-decorator) %description Given a html document, it pulls out the main body text and cleans it up. This is a python port of a ruby port of arc90's readability project. %package -n python3-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python3-%{pypi_name}} %?python_enable_dependency_generator %description -n python3-%{pypi_name} Given a html document, it pulls out the main body text and cleans it up. This is a python port of a ruby port of arc90's readability project. %prep %autosetup -n python-readability-%{commit} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %build %py3_build %install %py3_install %check %{python3} -m pytest -v %files -n python3-%{pypi_name} %doc README.rst %{python3_sitelib}/readability_lxml-*-py%{python3_version}.egg-info %{python3_sitelib}/readability/ %changelog * Fri Mar 20 2020 Artem Polishchuk - 0.7.1-1.20200320git5800210 - Update to latest git snapshot (0.8beta) * Fri Mar 20 2020 Artem Polishchuk - 0.7.1-1 - Initial package