summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c1bb4502d69e40745e492940cf1e88a384293450 (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
# Maintainer: Benoit Pierre <benoit.pierre@gmail.com>

pkgname=python-rtf_tokenize
pkgdesc="A simple RTF tokenizer."
pkgver=1.0.0
pkgrel=2
arch=('any')
license=('GPL2')
depends=('python')
makedepends=(
    'python-build'
    'python-install'
    'python-pytest'
    'python-setuptools'
)
url="https://github.com/benoit-pierre/rtf_tokenize"
source=("$pkgname-$pkgver.tar.gz::https://github.com/benoit-pierre/rtf_tokenize/archive/refs/tags/$pkgver.tar.gz")
sha256sums=(bcaecdf0d6092659ab988a8f4a406a72fd7d712791446d002b2818738289ae40)

build() {
  cd "rtf_tokenize-$pkgver"
  pyproject-build --no-isolation --skip-dependency-check --wheel
}

check() {
  cd "rtf_tokenize-$pkgver"
  PYTHONPATH="$PWD/build/lib.linux-$CARCH-$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')" pytest test
}

package() {
  cd "rtf_tokenize-$pkgver"
  python -m install --destdir="$pkgdir" --optimize=1 dist/*.whl
  chmod og+rX -R "$pkgdir"
}

# vim:set sw=2 sts=2 et: