python-chardet: bump to 7.0.1
authorAlexandru Ardelean <redacted>
Wed, 11 Mar 2026 14:38:46 +0000 (16:38 +0200)
committerAlexandru Ardelean <redacted>
Sat, 14 Mar 2026 08:22:59 +0000 (10:22 +0200)
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 <redacted>
lang/python/python-chardet/Makefile
lang/python/python-chardet/test.sh [new file with mode: 0644]

index 7b69e537350d9e2c6b98f24069b9359b2425c56d..1c25c8e940d9cc09307f7526a6de0baf99c4c801 100644 (file)
@@ -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 <ardeleanalex@gmail.com>
   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 (file)
index 0000000..fde63b3
--- /dev/null
@@ -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
git clone https://git.99rst.org/PROJECT