forked from pool/python-lxml_html_clean
- Update to 0.4.1
* Bugs fixed
- Removed superfluous debug prints.
- Changes from 0.4.0
* Bugs fixed
- The Cleaner() now scans for hidden JavaScript code embedded
within CSS comments. In certain contexts, such as within
<svg> or <math> tags, <style> tags may lose their intended
function, allowing comments like /* foo */ to potentially be
executed by the browser. If a suspicious content is detected,
only the comment is removed.
- Changes from 0.3.1
* Features added
- Do not parse URL addresses when it is not necessary.
- Changes from 0.3.0
* Features added
- Parsing of URL addresses has been enhanced and Cleaner
removes ambiguous URLs.
- Changes from 0.2.2
* Bugs fixed
- sdist now includes all test files and changelog.
- Changes from 0.2.1
* Bugs fixed
- Memory efficiency is now much better for HTML pages where
cleaner removes a lot of elements. (#14)
- Changes from 0.2.0
* Features added
- ASCII control characters (except HT, VT, CR and LF) are now
removed from string inputs before they're parsed by lxml/libxml2.
- Fix boo#1233541
OBS-URL: https://build.opensuse.org/request/show/1225615
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-lxml_html_clean?expand=0&rev=5
73 lines
2.2 KiB
RPMSpec
73 lines
2.2 KiB
RPMSpec
#
|
|
# spec file for package python-lxml_html_clean
|
|
#
|
|
# Copyright (c) 2024 SUSE LLC
|
|
#
|
|
# 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.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%{?sle15_python_module_pythons}
|
|
%define skip_python2 1
|
|
Name: python-lxml_html_clean
|
|
Version: 0.4.1
|
|
Release: 0
|
|
Summary: HTML cleaner from lxml project
|
|
License: BSD-3-Clause
|
|
Group: Development/Languages/Python
|
|
URL: https://github.com/fedora-python/lxml_html_clean/
|
|
Source: https://files.pythonhosted.org/packages/source/l/lxml-html-clean/lxml_html_clean-%{version}.tar.gz
|
|
BuildRequires: %{python_module base >= 3.6}
|
|
BuildRequires: %{python_module pip}
|
|
BuildRequires: %{python_module setuptools >= 61.0}
|
|
BuildRequires: %{python_module wheel}
|
|
BuildRequires: python-rpm-macros
|
|
# SECTION test requirements
|
|
BuildRequires: %{python_module pytest}
|
|
BuildRequires: %{python_module lxml}
|
|
# /SECTION
|
|
BuildRequires: fdupes
|
|
Requires: python-lxml
|
|
BuildArch: noarch
|
|
%python_subpackages
|
|
|
|
%description
|
|
Separate project for HTML cleaning functionalities copied from lxml.html.clean.
|
|
|
|
%prep
|
|
%autosetup -p1 -n lxml_html_clean-%{version}
|
|
# Rise up errors during check. Error in python-lxml?
|
|
rm tests/*.txt
|
|
|
|
%build
|
|
%pyproject_wheel
|
|
|
|
%install
|
|
%pyproject_install
|
|
# Fix python-bytecode-inconsistent-mtime
|
|
pushd %{buildroot}%{python_sitelib}
|
|
find . -name '*.pyc' -exec rm -f '{}' ';'
|
|
python%python_bin_suffix -m compileall *.py ';'
|
|
popd
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%check
|
|
%pytest
|
|
|
|
%files %{python_files}
|
|
%license LICENSE.txt
|
|
%doc README.md
|
|
%{python_sitelib}/lxml_html_clean
|
|
%{python_sitelib}/lxml_html_clean-%{version}.dist-info
|
|
|
|
%changelog
|