2017-08-23 18:38:10 +00:00
|
|
|
#
|
2017-07-31 06:03:50 +00:00
|
|
|
# spec file for package python-html5-parser
|
|
|
|
#
|
2023-06-23 05:18:02 +00:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2017-07-31 06:03:50 +00: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.
|
|
|
|
|
2019-02-05 16:54:54 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-07-31 06:03:50 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2023-06-23 05:18:02 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
2017-07-31 06:03:50 +00:00
|
|
|
Name: python-html5-parser
|
2023-11-20 06:32:34 +00:00
|
|
|
Version: 0.4.12
|
2017-07-31 06:03:50 +00:00
|
|
|
Release: 0
|
2017-09-30 13:15:05 +00:00
|
|
|
Summary: C based HTML 5 parsing for Python
|
2017-07-31 06:03:50 +00:00
|
|
|
License: Apache-2.0
|
|
|
|
Group: Development/Languages/Python
|
2019-09-11 15:03:16 +00:00
|
|
|
URL: https://github.com/kovidgoyal/html5-parser
|
2019-07-01 06:45:58 +00:00
|
|
|
Source: https://github.com/kovidgoyal/html5-parser/archive/v%{version}/%{name}-%{version}.tar.gz
|
2017-08-23 18:38:10 +00:00
|
|
|
BuildRequires: %{python_module beautifulsoup4}
|
2021-10-15 08:36:34 +00:00
|
|
|
BuildRequires: %{python_module chardet}
|
2017-07-31 06:03:50 +00:00
|
|
|
BuildRequires: %{python_module devel}
|
|
|
|
BuildRequires: %{python_module lxml >= 3.8.0}
|
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: fdupes
|
2019-02-05 16:54:54 +00:00
|
|
|
BuildRequires: pkgconfig
|
2017-07-31 06:03:50 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2017-08-23 18:38:10 +00:00
|
|
|
BuildRequires: pkgconfig(libxml-2.0)
|
2017-07-31 06:03:50 +00:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
2017-09-30 13:15:05 +00:00
|
|
|
A standards compliant, C based HTML 5 parser for Python. It processes HTML
|
|
|
|
about thirty times faster than the "html5lib" pure Python based parser.
|
2017-07-31 06:03:50 +00:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n html5-parser-%{version}
|
|
|
|
|
|
|
|
%build
|
2021-06-01 16:55:33 +00:00
|
|
|
find . -name '*.py' -exec sed -i '/#.*usr.bin.env.*python/d' {} \;
|
2017-07-31 06:03:50 +00:00
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
|
|
|
|
2020-04-09 12:36:20 +00:00
|
|
|
%check
|
2021-06-01 16:55:33 +00:00
|
|
|
%if 0%{?suse_version} > 1500
|
|
|
|
%pyunittest_arch -v test/*.py
|
|
|
|
%else
|
2020-04-09 12:36:20 +00:00
|
|
|
%python_exec setup.py test
|
2021-06-01 16:55:33 +00:00
|
|
|
%endif
|
2020-04-09 12:36:20 +00:00
|
|
|
|
2017-07-31 06:03:50 +00:00
|
|
|
%files %{python_files}
|
2019-09-11 15:03:16 +00:00
|
|
|
%license LICENSE
|
|
|
|
%doc README.rst
|
2017-07-31 06:03:50 +00:00
|
|
|
%{python_sitearch}/html5_parser/
|
|
|
|
%{python_sitearch}/html5_parser-%{version}-py%{python_version}.egg-info
|
|
|
|
|
|
|
|
%changelog
|