diff options
author | CoprDistGit <infra@openeuler.org> | 2023-06-27 01:53:42 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-06-27 01:53:43 +0000 |
commit | e4d28b33e338cabd2fc42f4ccde64f8224ab0ad5 (patch) | |
tree | 94383a30b4386dac514e850f851697742e556316 | |
parent | 81ea4b62c014f36697f937a31e4108afe46d8ab3 (diff) |
automatic import of python-html5-parser
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-html5-parser-orig.spec | 66 | ||||
-rw-r--r-- | python-html5-parser.spec | 72 | ||||
-rw-r--r-- | sources | 2 |
4 files changed, 74 insertions, 67 deletions
@@ -1 +1,2 @@ /html5-parser-0.4.10.tar.gz +/html5-parser-0.4.11.tar.gz diff --git a/python-html5-parser-orig.spec b/python-html5-parser-orig.spec deleted file mode 100644 index 3b1537b..0000000 --- a/python-html5-parser-orig.spec +++ /dev/null @@ -1,66 +0,0 @@ -%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/python-html5-parser.spec b/python-html5-parser.spec new file mode 100644 index 0000000..d4d3e71 --- /dev/null +++ b/python-html5-parser.spec @@ -0,0 +1,72 @@ +%global _empty_manifest_terminate_build 0 +Name: python-html5-parser +Version: 0.4.11 +Release: 1 +Summary: Fast C based HTML 5 parsing for python +License: Apache 2.0 +URL: https://html5-parser.readthedocs.io +Source0: https://files.pythonhosted.org/packages/20/2d/f2f3d91d73b715e24943896a338be9591537e293522344b0acfd1ee75d92/html5-parser-0.4.11.tar.gz +BuildArch: noarch + + +%description + + +%package -n python3-html5-parser +Summary: Fast C based HTML 5 parsing for python +Provides: python-html5-parser +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-html5-parser + + +%package help +Summary: Development documents and examples for html5-parser +Provides: python3-html5-parser-doc +%description help + + +%prep +%autosetup -n html5-parser-0.4.11 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-html5-parser -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Jun 27 2023 Python_Bot <Python_Bot@openeuler.org> - 0.4.11-1 +- Package Spec generated @@ -1 +1 @@ -2270f7038502c1238b0b08971a8de423 html5-parser-0.4.10.tar.gz +79bced5b3b97f028dae7b6c9e04f5975 html5-parser-0.4.11.tar.gz |