void-packages/srcpkgs/python-chardet/template

32 lines
930 B
Bash

# Template file for 'python-chardet'
pkgname=python-chardet
version=4.0.0
revision=2
wrksrc="chardet-${version}"
build_style=python-module
hostmakedepends="python-setuptools python3-setuptools"
depends="python-setuptools"
checkdepends="python3-pytest python-pytest"
short_desc="Universal encoding detector for Python 2 and 3 (Python2)"
maintainer="Alessio Sergi <al3hex@gmail.com>"
license="LGPL-2.1-only"
homepage="https://github.com/chardet/chardet"
distfiles="${PYPI_SITE}/c/chardet/chardet-${version}.tar.gz"
checksum=0d6f53a15db4120f2b08c94f11e7d93d2c911ee118b6b30a04ec3ee8310179fa
alternatives="chardet:chardetect:/usr/bin/chardetect2"
do_check() {
python2 -m pytest
python3 -m pytest
}
python3-chardet_package() {
depends="python3-setuptools"
short_desc="${short_desc/Python2/Python3}"
alternatives="chardet:chardetect:/usr/bin/chardetect3"
pkg_install() {
vmove usr/bin/chardetect3
vmove usr/lib/python3*
}
}