blob: d41bb40a543242a9c21c096cd508422fc3b596b2 (
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
42
|
# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>
pkgname=python-sacrebleu
_pkg="${pkgname#python-}"
pkgver=2.3.0
pkgrel=1
pkgdesc='Reference BLEU implementation that auto-downloads test sets'
arch=('any')
url="https://github.com/mjpost/sacrebleu"
license=('Apache')
depends=(
'python-colorama'
'python-lxml'
'python-numpy'
'python-portalocker'
'python-regex'
'python-tabulate')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
checkdepends=('python-pytest')
changelog=CHANGELOG.md
source=("$pkgname-$pkgver.tar.gz::https://github.com/mjpost/$_pkg/archive/refs/tags/v$pkgver.zip"
'setup.py.patch')
sha256sums=('88686b7e9fed754c4e667fa380ed1127e0d82923a16d1f0d95af02f5bc0c12c5'
'f1c476ca26f36cdf55cad6c4452c3a9d84ff7b962b17e28a7c2a622753f6ced7')
prepare() {
patch -p1 -d "$_pkg-$pkgver" < setup.py.patch
}
build() {
python -m build -nw "$_pkg-$pkgver"
}
check() {
cd "$_pkg-$pkgver"
PYTHONPATH="$PWD" pytest -x
}
package() {
cd "$_pkg-$pkgver"
python -m installer --destdir="$pkgdir/" dist/*.whl
}
|