summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-04-10 07:32:03 +0000
committerCoprDistGit <infra@openeuler.org>2023-04-10 07:32:03 +0000
commitd74e40ff5c324f90c5c47926571ae8026c3b9db3 (patch)
treef728aecf269e2c5211c7014210d31b0dc62a3a03
parent3189f6614edfea0864822c7e10ba86053eaef929 (diff)
automatic import of python-webencodings
-rw-r--r--.gitignore1
-rw-r--r--python-webencodings.spec126
-rw-r--r--sources1
3 files changed, 128 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..6c17c7a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/webencodings-0.5.1.tar.gz
diff --git a/python-webencodings.spec b/python-webencodings.spec
new file mode 100644
index 0000000..285ca3a
--- /dev/null
+++ b/python-webencodings.spec
@@ -0,0 +1,126 @@
+%global _empty_manifest_terminate_build 0
+Name: python-webencodings
+Version: 0.5.1
+Release: 1
+Summary: Character encoding aliases for legacy web content
+License: BSD
+URL: https://github.com/SimonSapin/python-webencodings
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/0b/02/ae6ceac1baeda530866a85075641cec12989bd8d31af6d5ab4a3e8c92f47/webencodings-0.5.1.tar.gz
+BuildArch: noarch
+
+
+%description
+This is a Python implementation of the `WHATWG Encoding standard
+<http://encoding.spec.whatwg.org/>`_.
+* Latest documentation: http://packages.python.org/webencodings/
+* Source code and issue tracker:
+ https://github.com/gsnedders/python-webencodings
+* PyPI releases: http://pypi.python.org/pypi/webencodings
+* License: BSD
+* Python 2.6+ and 3.3+
+In order to be compatible with legacy web content
+when interpreting something like ``Content-Type: text/html; charset=latin1``,
+tools need to use a particular set of aliases for encoding labels
+as well as some overriding rules.
+For example, ``US-ASCII`` and ``iso-8859-1`` on the web are actually
+aliases for ``windows-1252``, and an UTF-8 or UTF-16 BOM takes precedence
+over any other encoding declaration.
+The Encoding standard defines all such details so that implementations do
+not have to reverse-engineer each other.
+This module has encoding labels and BOM detection,
+but the actual implementation for encoders and decoders is Python’s.
+
+%package -n python3-webencodings
+Summary: Character encoding aliases for legacy web content
+Provides: python-webencodings
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-webencodings
+This is a Python implementation of the `WHATWG Encoding standard
+<http://encoding.spec.whatwg.org/>`_.
+* Latest documentation: http://packages.python.org/webencodings/
+* Source code and issue tracker:
+ https://github.com/gsnedders/python-webencodings
+* PyPI releases: http://pypi.python.org/pypi/webencodings
+* License: BSD
+* Python 2.6+ and 3.3+
+In order to be compatible with legacy web content
+when interpreting something like ``Content-Type: text/html; charset=latin1``,
+tools need to use a particular set of aliases for encoding labels
+as well as some overriding rules.
+For example, ``US-ASCII`` and ``iso-8859-1`` on the web are actually
+aliases for ``windows-1252``, and an UTF-8 or UTF-16 BOM takes precedence
+over any other encoding declaration.
+The Encoding standard defines all such details so that implementations do
+not have to reverse-engineer each other.
+This module has encoding labels and BOM detection,
+but the actual implementation for encoders and decoders is Python’s.
+
+%package help
+Summary: Development documents and examples for webencodings
+Provides: python3-webencodings-doc
+%description help
+This is a Python implementation of the `WHATWG Encoding standard
+<http://encoding.spec.whatwg.org/>`_.
+* Latest documentation: http://packages.python.org/webencodings/
+* Source code and issue tracker:
+ https://github.com/gsnedders/python-webencodings
+* PyPI releases: http://pypi.python.org/pypi/webencodings
+* License: BSD
+* Python 2.6+ and 3.3+
+In order to be compatible with legacy web content
+when interpreting something like ``Content-Type: text/html; charset=latin1``,
+tools need to use a particular set of aliases for encoding labels
+as well as some overriding rules.
+For example, ``US-ASCII`` and ``iso-8859-1`` on the web are actually
+aliases for ``windows-1252``, and an UTF-8 or UTF-16 BOM takes precedence
+over any other encoding declaration.
+The Encoding standard defines all such details so that implementations do
+not have to reverse-engineer each other.
+This module has encoding labels and BOM detection,
+but the actual implementation for encoders and decoders is Python’s.
+
+%prep
+%autosetup -n webencodings-0.5.1
+
+%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-webencodings -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon Apr 10 2023 Python_Bot <Python_Bot@openeuler.org> - 0.5.1-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..2abaafe
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+32f6e261d52e57bf7e1c4d41546d15b8 webencodings-0.5.1.tar.gz