2012-02-11 13:45:15 +01:00
#
# spec file for package python-html5lib
#
2023-04-21 15:19:50 +02:00
# Copyright (c) 2023 SUSE LLC
2012-02-11 13:45:15 +01:00
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
2012-03-29 11:54:13 +02:00
2018-12-04 14:32:22 +01:00
# Please submit bugfixes or comments via https://bugs.opensuse.org/
2012-02-11 13:45:15 +01:00
#
2014-06-02 11:05:25 +02:00
2017-04-06 07:42:07 +02:00
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
2023-04-21 15:19:50 +02:00
%{?sle15_python_module_pythons}
2009-10-14 19:04:50 +02:00
Name : python-html5lib
2020-08-27 21:44:55 +02:00
Version : 1.1
2012-02-11 13:45:15 +01:00
Release : 0
2012-03-29 11:54:13 +02:00
Summary : HTML parser based on the WHAT-WG Web Applications 1
2014-06-02 11:05:25 +02:00
License : MIT
2018-12-04 18:14:31 +01:00
URL : https://github.com/html5lib/html5lib-python
2017-12-13 14:39:25 +01:00
Source : https://files.pythonhosted.org/packages/source/h/html5lib/html5lib-%{version} .tar.gz
2020-08-27 21:44:55 +02:00
# PATCH-FIX_UPSTREAM https://github.com/html5lib/html5lib-python/commit/2c19b9899ab3a3e8bd0ca35e5d78544334204169 Use Node.from_parent() constructor to support pytest 6
Patch0 : pytest6.patch
2022-03-23 22:27:20 +01:00
# https://github.com/html5lib/html5lib-python/issues/541
Patch1 : python-html5lib-no-mock.patch
2023-07-27 09:55:07 +02:00
# PATCH-FIX-UPSTREAM https://github.com/html5lib/html5lib-python/pull/570 adapt testsuite to changes in pytest 7.4
Patch2 : pytest74.patch
2017-04-06 07:42:07 +02:00
BuildRequires : %{python_module Genshi}
BuildRequires : %{python_module lxml}
2020-05-29 11:19:42 +02:00
BuildRequires : %{python_module pytest >= 4.0}
2019-10-14 15:39:51 +02:00
BuildRequires : %{python_module pytest-expect}
2017-04-06 07:42:07 +02:00
BuildRequires : %{python_module setuptools >= 18.5}
2017-12-13 14:39:25 +01:00
BuildRequires : %{python_module six >= 1.9}
2017-04-06 07:42:07 +02:00
BuildRequires : %{python_module webencodings}
BuildRequires : fdupes
BuildRequires : python-rpm-macros
2017-12-13 14:39:25 +01:00
Requires : python-six >= 1.9
2017-04-07 18:07:46 +02:00
Requires : python-webencodings
2017-04-06 07:42:07 +02:00
Recommends: python-Genshi
2015-08-04 10:40:00 +02:00
Recommends: python-lxml
2010-01-18 01:14:47 +01:00
BuildArch : noarch
2017-04-06 07:42:07 +02:00
%python_subpackages
2009-10-14 19:04:50 +02:00
%description
2012-03-29 11:54:13 +02:00
HTML parser designed to follow the HTML5
specification. The parser is designed to handle all flavours of HTML and
2012-02-11 13:45:15 +01:00
parses invalid documents using well-defined error handling rules compatible
2009-10-14 19:04:50 +02:00
with the behaviour of major desktop web browsers.
2012-02-11 13:45:15 +01:00
Output is to a tree structure; the current release supports output to
DOM, ElementTree, lxml and BeautifulSoup tree formats as well as a
simple custom format
2009-10-14 19:04:50 +02:00
%prep
%setup -q -n html5lib-%{version}
2019-11-01 11:51:33 +01:00
%autopatch -p1
2009-10-14 19:04:50 +02:00
%build
2017-04-06 07:42:07 +02:00
%python_build
2009-10-14 19:04:50 +02:00
%install
2017-04-06 07:42:07 +02:00
%python_install
2019-10-14 15:39:51 +02:00
%python_expand %fdupes %{buildroot} %{$python_sitelib}
2012-03-29 11:54:13 +02:00
2016-02-12 16:04:05 +01:00
%check
2019-10-14 15:51:35 +02:00
%pytest --tb=short
2009-10-14 19:04:50 +02:00
2017-04-06 07:42:07 +02:00
%files %{python_files}
2018-12-04 18:14:31 +01:00
%license LICENSE
%doc CHANGES.rst README.rst
2013-10-22 15:57:29 +02:00
%{python_sitelib} /html5lib/
2017-04-06 07:42:07 +02:00
%{python_sitelib} /html5lib-%{version} -py%{python_version} .egg-info
2009-10-14 19:04:50 +02:00
2012-02-11 13:45:15 +01:00
%changelog