From 6e014ede1946a374a6fe80925db70efea92a279f Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Wed, 11 Mar 2026 16:38:46 +0200 Subject: [PATCH] python-chardet: bump to 7.0.1 Full release notes: https://github.com/chardet/chardet/releases/tag/7.0.1 Add 'python3-codecs' as dependency. No idea when (or if) this was ever needed, but it became obvious after test.sh was added. Signed-off-by: Alexandru Ardelean --- lang/python/python-chardet/Makefile | 16 ++++++++++------ lang/python/python-chardet/test.sh | 13 +++++++++++++ 2 files changed, 23 insertions(+), 6 deletions(-) create mode 100644 lang/python/python-chardet/test.sh diff --git a/lang/python/python-chardet/Makefile b/lang/python/python-chardet/Makefile index 7b69e53735..1c25c8e940 100644 --- a/lang/python/python-chardet/Makefile +++ b/lang/python/python-chardet/Makefile @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-chardet -PKG_VERSION:=5.2.0 -PKG_RELEASE:=4 +PKG_VERSION:=7.0.1 +PKG_RELEASE:=1 PYPI_NAME:=chardet -PKG_HASH:=1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7 +PKG_HASH:=6fce895c12c5495bb598e59ae3cd89306969b4464ec7b6dd609b9c86e3397fe3 PKG_LICENSE:=LGPL-2.1-or-later PKG_LICENSE_FILES:=LICENSE @@ -22,8 +22,12 @@ HOST_BUILD_DEPENDS:= \ python-build/host \ python-installer/host \ python-wheel/host \ - python-setuptools/host -PKG_BUILD_DEPENDS:=python-setuptools/host + python-hatch-vcs/host \ + python-hatchling/host + +PKG_BUILD_DEPENDS:= \ + python-hatch-vcs/host \ + python-hatchling/host include ../pypi.mk include $(INCLUDE_DIR)/package.mk @@ -38,7 +42,7 @@ define Package/python3-chardet MAINTAINER:=Alexandru Ardelean URL:=https://github.com/chardet/chardet TITLE:=Universal encoding detector - DEPENDS:=+python3-light +python3-logging + DEPENDS:=+python3-light +python3-logging +python3-codecs endef define Package/python3-chardet/description diff --git a/lang/python/python-chardet/test.sh b/lang/python/python-chardet/test.sh new file mode 100644 index 0000000000..fde63b3c86 --- /dev/null +++ b/lang/python/python-chardet/test.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +[ "$1" = python3-chardet ] || exit 0 + +python3 - << 'EOF' +import chardet + +result = chardet.detect(b'Hello, World!') +assert result['encoding'] is not None + +result = chardet.detect('Привет мир'.encode('utf-8')) +assert result['encoding'] is not None +EOF