Import to py-webencodings 0.5.1, ok sthen@

DESCR:

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.
This commit is contained in:
shadchin 2017-05-24 14:54:28 +00:00
parent 6e479cbc63
commit 90ed0b1ed7
4 changed files with 61 additions and 0 deletions

View File

@ -0,0 +1,28 @@
# $OpenBSD: Makefile,v 1.1.1.1 2017/05/24 14:54:28 shadchin Exp $
COMMENT = character encoding aliases for legacy web content
MODPY_EGG_VERSION = 0.5.1
DISTNAME = webencodings-${MODPY_EGG_VERSION}
PKGNAME = py-${DISTNAME}
CATEGORIES = textproc
MAINTAINER = Alexandr Shadchin <shadchin@openbsd.org>
# BSD
PERMIT_PACKAGE_CDROM = Yes
MODULES = lang/python
MODPY_PI = Yes
MODPY_SETUPTOOLS = Yes
FLAVORS = python3
FLAVOR ?=
TEST_DEPENDS = devel/py-nose${MODPY_FLAVOR}
do-test:
cd ${WRKSRC}; ${LOCALBASE}/bin/nosetests${MODPY_BIN_SUFFIX} -v
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
SHA256 (webencodings-0.5.1.tar.gz) = s2ocJF8tMEll604KgoSDeSQdwEuGWvzEqrFnSFh+GSM=
SIZE (webencodings-0.5.1.tar.gz) = 9721

View File

@ -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.

View File

@ -0,0 +1,18 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2017/05/24 14:54:28 shadchin Exp $
lib/python${MODPY_VERSION}/site-packages/webencodings/
lib/python${MODPY_VERSION}/site-packages/webencodings-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/
lib/python${MODPY_VERSION}/site-packages/webencodings-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/PKG-INFO
lib/python${MODPY_VERSION}/site-packages/webencodings-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/SOURCES.txt
lib/python${MODPY_VERSION}/site-packages/webencodings-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/dependency_links.txt
lib/python${MODPY_VERSION}/site-packages/webencodings-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/top_level.txt
lib/python${MODPY_VERSION}/site-packages/webencodings/__init__.py
${MODPY_COMMENT}lib/python${MODPY_VERSION}/site-packages/webencodings/${MODPY_PYCACHE}/
lib/python${MODPY_VERSION}/site-packages/webencodings/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}pyc
lib/python${MODPY_VERSION}/site-packages/webencodings/${MODPY_PYCACHE}labels.${MODPY_PYC_MAGIC_TAG}pyc
lib/python${MODPY_VERSION}/site-packages/webencodings/${MODPY_PYCACHE}mklabels.${MODPY_PYC_MAGIC_TAG}pyc
lib/python${MODPY_VERSION}/site-packages/webencodings/${MODPY_PYCACHE}tests.${MODPY_PYC_MAGIC_TAG}pyc
lib/python${MODPY_VERSION}/site-packages/webencodings/${MODPY_PYCACHE}x_user_defined.${MODPY_PYC_MAGIC_TAG}pyc
lib/python${MODPY_VERSION}/site-packages/webencodings/labels.py
lib/python${MODPY_VERSION}/site-packages/webencodings/mklabels.py
lib/python${MODPY_VERSION}/site-packages/webencodings/tests.py
lib/python${MODPY_VERSION}/site-packages/webencodings/x_user_defined.py