# Description: Python module for character encoding auto-detection.
# URL: https://github.com/erikrose/chardet
# Maintainer: John McQuah, jmcquah at disroot dot org
# Depends on: python3-hatch-vcs

name=python3-chardet
version=7.4.3
release=1
source=(https://files.pythonhosted.org/packages/source/c/chardet/chardet-$version.tar.gz)

build() {
  cd chardet-$version

  /usr/bin/python3 -m build --wheel --skip-dependency-check --no-isolation
  /usr/bin/python3 -m installer --destdir="$PKG" dist/*.whl

  rm -rf "$PKG"/usr/lib/python3.12/site-packages/chardet-$version.dist-info/licenses
}
