pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/textproc/py-webencodings Import webencodings 0.5 as te...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0093a55f1120
branches:  trunk
changeset: 354294:0093a55f1120
user:      kleink <kleink%pkgsrc.org@localhost>
date:      Wed Oct 26 07:50:24 2016 +0000

description:
Import webencodings 0.5 as textproc/py-webencodings.

This is a Python implementation of the WHATWG Encoding standard.

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.

diffstat:

 textproc/py-webencodings/DESCR    |  13 +++++++++++++
 textproc/py-webencodings/Makefile |  16 ++++++++++++++++
 textproc/py-webencodings/PLIST    |  20 ++++++++++++++++++++
 textproc/py-webencodings/distinfo |   6 ++++++
 4 files changed, 55 insertions(+), 0 deletions(-)

diffs (71 lines):

diff -r 73aa72f6b765 -r 0093a55f1120 textproc/py-webencodings/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/py-webencodings/DESCR    Wed Oct 26 07:50:24 2016 +0000
@@ -0,0 +1,13 @@
+This is a Python implementation of the WHATWG Encoding standard.
+
+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.
diff -r 73aa72f6b765 -r 0093a55f1120 textproc/py-webencodings/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/py-webencodings/Makefile Wed Oct 26 07:50:24 2016 +0000
@@ -0,0 +1,16 @@
+# $NetBSD: Makefile,v 1.1 2016/10/26 07:50:24 kleink Exp $
+
+DISTNAME=      webencodings-0.5
+PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
+CATEGORIES=    textproc www python
+MASTER_SITES=  ${MASTER_SITE_PYPI:=w/webencodings/}
+
+MAINTAINER=    kleink%NetBSD.org@localhost
+HOMEPAGE=      https://pythonhosted.org/webencodings/
+COMMENT=       Character encoding for the web
+LICENSE=       modified-bsd
+
+USE_LANGUAGES= # empty
+
+.include "../../lang/python/egg.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 73aa72f6b765 -r 0093a55f1120 textproc/py-webencodings/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/py-webencodings/PLIST    Wed Oct 26 07:50:24 2016 +0000
@@ -0,0 +1,20 @@
+@comment $NetBSD: PLIST,v 1.1 2016/10/26 07:50:24 kleink Exp $
+${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
+${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
+${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
+${PYSITELIB}/${EGG_INFODIR}/top_level.txt
+${PYSITELIB}/webencodings/__init__.py
+${PYSITELIB}/webencodings/__init__.pyo
+${PYSITELIB}/webencodings/__init__.pyc
+${PYSITELIB}/webencodings/labels.py
+${PYSITELIB}/webencodings/labels.pyo
+${PYSITELIB}/webencodings/labels.pyc
+${PYSITELIB}/webencodings/mklabels.py
+${PYSITELIB}/webencodings/mklabels.pyo
+${PYSITELIB}/webencodings/mklabels.pyc
+${PYSITELIB}/webencodings/tests.py
+${PYSITELIB}/webencodings/tests.pyo
+${PYSITELIB}/webencodings/tests.pyc
+${PYSITELIB}/webencodings/x_user_defined.py
+${PYSITELIB}/webencodings/x_user_defined.pyo
+${PYSITELIB}/webencodings/x_user_defined.pyc
diff -r 73aa72f6b765 -r 0093a55f1120 textproc/py-webencodings/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/py-webencodings/distinfo Wed Oct 26 07:50:24 2016 +0000
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1 2016/10/26 07:50:24 kleink Exp $
+
+SHA1 (webencodings-0.5.tar.gz) = ddfaad0b2ee2ba84dde81a6793c60934a4172f4d
+RMD160 (webencodings-0.5.tar.gz) = 2d8beeb2b2506e9aa6a97410b5540a8070bf7a5b
+SHA512 (webencodings-0.5.tar.gz) = 3f0c1995d23a8ccf8f0b02301edec5834336c27b7daf2335ded888073a1f13058acd93477cd020bb2b12d51b393d9b3166acf4995564cb9751ace8df35a891c2
+Size (webencodings-0.5.tar.gz) = 9479 bytes



Home | Main Index | Thread Index | Old Index