diff options
author | Alexandru Ardelean <alex@shruggie.ro> | 2023-10-03 20:15:23 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-03 20:15:23 +0300 |
commit | 2a5707511f3599ac13ce3294a19d506328c30517 (patch) | |
tree | d1569bc6735f8898d6f569ab1c9e5850fe154d5e /lang/python | |
parent | d2c6bf0e991b2980feb381bfee3926dad344f2eb (diff) | |
parent | 85540346fef07abf5df1a2d3558b341e7afb60d8 (diff) |
Merge pull request #22284 from jefferyto/python-charset-normalizer-3.3.0
python-charset-normalizer: Update to 3.3.0
Diffstat (limited to 'lang/python')
-rw-r--r-- | lang/python/python-charset-normalizer/Makefile | 4 | ||||
-rw-r--r-- | lang/python/python-charset-normalizer/test.sh | 12 |
2 files changed, 14 insertions, 2 deletions
diff --git a/lang/python/python-charset-normalizer/Makefile b/lang/python/python-charset-normalizer/Makefile index 7a2e4ee07..6e88357d2 100644 --- a/lang/python/python-charset-normalizer/Makefile +++ b/lang/python/python-charset-normalizer/Makefile @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-charset-normalizer -PKG_VERSION:=3.2.0 +PKG_VERSION:=3.3.0 PKG_RELEASE:=1 PYPI_NAME:=charset-normalizer -PKG_HASH:=3bb3d25a8e6c0aedd251753a79ae98a093c7e7b471faa3aa9a93a81431987ace +PKG_HASH:=63563193aec44bce707e0c5ca64ff69fa72ed7cf34ce6e11d5127555756fd2f6 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE diff --git a/lang/python/python-charset-normalizer/test.sh b/lang/python/python-charset-normalizer/test.sh new file mode 100644 index 000000000..b1b2f7996 --- /dev/null +++ b/lang/python/python-charset-normalizer/test.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +[ "$1" = python3-charset-normalizer ] || exit 0 + +python3 - << EOF +import sys +from charset_normalizer import from_bytes +s = 'Bсеки човек има право на образование.' +byte_str = s.encode('cp1251') +result = from_bytes(byte_str).best() +sys.exit(0 if str(result) == s else 1) +EOF |