archrelease: copy trunk to community-any
[ArchLinux/community.git] / python-charset-normalizer / trunk / PKGBUILD
blob1ff34781292eef276c162e3f1252b3fe2024dc43
1 # Maintainer: Maxime Gauduin <alucryd@archlinux.org>
2 # Contributor: lilydjwg <lilydjwg@gmail.com>
3 # Contributor: lilac <lilac@build.archlinuxcn.org>
4 # Contributor: Dimitris Kiziridis <ragouel@outlook.com>
6 pkgname=python-charset-normalizer
7 pkgver=3.1.0
8 pkgrel=3
9 pkgdesc='Encoding and language detection alternative to chardet'
10 arch=(any)
11 url=https://github.com/ousret/charset_normalizer
12 license=(MIT)
13 depends=(python)
14 makedepends=(
15   git
16   python-setuptools
18 checkdepends=(
19   python-pytest
20   python-pytest-cov
22 _tag=db9af4323fee938d6bdfed3aae20339da26ead11
23 source=(git+https://github.com/Ousret/charset_normalizer.git#tag=${_tag})
24 b2sums=(SKIP)
26 pkgver() {
27   cd charset_normalizer
28   _version=$(git describe --tags)
29   sed "s/2.1.0/${_version}/" -i charset_normalizer/version.py
30   echo ${_version}
33 build() {
34   cd charset_normalizer
35   python setup.py build
38 check() {
39   cd charset_normalizer
40   pytest
43 package() {
44   cd charset_normalizer
45   python setup.py install --root=$pkgdir --optimize=1 --skip-build
46   install -Dm 644 LICENSE -t "${pkgdir}"/usr/share/licenses/python-charset-normalizer/
49 # vim: ts=2 sw=2 et: