summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 210eff01e5c21ceb4e5d6fe0b127427c53505d1d (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Maintainer: weipeng <weipeng1999@qq.com>
_name="properscoring"
pkgname=python-${_name}
pkgver=0.1
pkgrel=1
epoch=
pkgdesc="Proper scoring rules for evaluating probabilistic forecasts in Python."
arch=("any")
url="https://github.com/properscoring/properscoring"
license=('Apache-2.0')
groups=()
depends=("python" "python-numpy" "python-scipy")
makedepends=(
    "python-build" "python-installer"  "python-wheel"
    # "python-setuptools" "python-setuptools-scm"
)
checkdepends=("python-nose")
optdepends=("python-numba")
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=(
    "${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz"
    "fix_test_brier.patch"
    "fix_expand_dims.patch"
)
noextract=()
sha256sums=(
    '55564e97da32c4db6ba05926d403a5c0fdfa4655fc4ed125c40095a8bd7484a4'
    '69b6f57b041708fc7731b26e0caa491edfd367e631eb3b34e4e2772eae16f16a'
    '0609120c7016756718107464d8b1149215dc776ab763a32e093a0f878ba081b5'
)
validpgpkeys=()

prepare() {
    cd "${srcdir}/${_name}-${pkgver}"
    patch -Np1 -i ../fix_test_brier.patch
    patch -Np1 -i ../fix_expand_dims.patch
}

build() {
    cd "${srcdir}/${_name}-${pkgver}"
    python -m build --wheel --no-isolation
    # python setup.py build
}

check() {
    cd "${srcdir}/${_name}-${pkgver}"
    nosetests
}

package() {
    cd "${srcdir}/${_name}-${pkgver}"
    python -m installer --destdir="$pkgdir" dist/*.whl
    # python setup.py install --root="$pkgdir" --optimize=1
}