summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2025-02-14 07:30:49 +0000
committerCoprDistGit <infra@openeuler.org>2025-02-14 07:30:49 +0000
commit8c16c5d3d28ce631615f30884a2cecf042ab1c72 (patch)
tree428ee5772466fa9132a8117c5bc5c24265ac6157
parent599d6fe7187c77c11b1220c1ccda02b8b3f3406e (diff)
automatic import of python-html5-parseropeneuler22.03_LTS_SP4
-rw-r--r--.gitignore1
-rw-r--r--python-html5-parser.spec66
-rw-r--r--sources1
3 files changed, 68 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..035bb3d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/html5-parser-0.4.10.tar.gz
diff --git a/python-html5-parser.spec b/python-html5-parser.spec
new file mode 100644
index 0000000..3b1537b
--- /dev/null
+++ b/python-html5-parser.spec
@@ -0,0 +1,66 @@
+%global srcname html5-parser
+
+Name: python-%{srcname}
+Version: 0.4.10
+Release: 1
+Summary: A fast, standards compliant, C based, HTML 5 parser for python
+
+# html5-parser-0.4.4/gumbo/utf8.c is MIT
+License: ASL 2.0 and MIT
+URL: https://pypi.python.org/pypi/%{srcname}
+Source0: https://files.pythonhosted.org/packages/source/h/%{srcname}/%{srcname}-%{version}.tar.gz
+
+BuildRequires: gcc
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: libxml2-devel
+BuildRequires: pkgconf
+# For tests
+BuildRequires: python3-lxml >= 3.8.0
+BuildRequires: gtest-devel
+BuildRequires: python3-chardet
+BuildRequires: python3-beautifulsoup4
+
+%description
+A fast, standards compliant, C based, HTML 5 parser for python
+
+%package -n python3-%{srcname}
+Summary: %{summary}
+%{?python_provide:%python_provide python3-%{srcname}}
+
+# This package bundles sigil-gumbo a fork of gumbo
+# Base project: https://github.com/google/gumbo-parser
+# Forked from above: https://github.com/Sigil-Ebook/sigil-gumbo
+# It also patches that bundled copy with other changes.
+# sigil-gumbo bundled here was added 20170601
+Provides: bundled(sigil-gumbo) = 0.9.3-20170601git0830e1145fe08
+# sigil-gumbo forked off gumbo-parser at this commit in 20160216
+Provides: bundled(gumbo-parser) = 0.9.3-20160216git69b580ab4de04
+
+%description -n python3-%{srcname}
+A fast, standards compliant, C based, HTML 5 parser for python
+
+%prep
+export debug=True
+%autosetup -n %{srcname}-%{version} -p1
+
+# remove shebangs from library files
+sed -i -e '/^#!\//, 1d' src/html5_parser/*.py
+
+%build
+%py3_build
+
+%install
+%py3_install
+
+%check
+%{__python3} setup.py test
+
+%files -n python3-%{srcname}
+%license LICENSE
+%doc README.rst
+%{python3_sitearch}/*
+
+%changelog
+* Tue Jun 27 2023 lichaoran <pkwarcraft@hotmail.com> - 0.4.10-1
+- Init package
diff --git a/sources b/sources
new file mode 100644
index 0000000..8ddc302
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+2270f7038502c1238b0b08971a8de423 html5-parser-0.4.10.tar.gz