summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0aec7a23dd0f0e8dcb6b8ec1218d3476a8563820 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Maintainer: atomicfs <https://aur.archlinux.org/account/atomicfs>

pkgname=python-langdetect
pkgver=1.0.9
pkgrel=6
pkgdesc="Language detection library ported from Google's language-detection"
arch=('any')
url="https://github.com/Mimino666/langdetect"
license=('Apache-2.0')
depends=(
  'python-six'
)
makedepends=(
  'git'
  'python-build'
  'python-installer'
  'python-wheel'
)
checkdepends=(
  'python-pytest'
)
source=("${pkgname}::git+${url}#commit=a1598f1afcbfe9a758cfd06bd688fbc5780177b2")
# Upstream is a mess, switching between github releases, tags and just commits
sha512sums=('SKIP')

check() {
  cd "${srcdir}/${pkgname}"
  pytest
}

build() {
  cd "${srcdir}/${pkgname}"
  python -m build --wheel --no-isolation
}

package() {
  cd "${srcdir}/${pkgname}"
  python -m installer --destdir="${pkgdir}" dist/*.whl

  install -vDm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
}