summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 52a570627d7007ad9d87dd4cadb16058b811eda9 (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
# Maintainer: Guillaume Horel <guillaume.horel@gmail.com>
pkgname='python-autograd'
_pkgname='autograd'
pkgver='1.7.0'
pkgrel=1
pkgdesc="Efficiently computes derivatives of numpy code"
url="https://github.com/HIPS/autograd"
depends=('python'
    'python-numpy'
    'python-scipy')
checkdepends=(python-pytest)
makedepends=(python-build python-installer python-setuptools python-wheel)
license=('MIT')
arch=('any')
source=("https://pypi.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha256sums=('de743fd368d6df523cd37305dcd171861a9752a144493677d2c9f5a56983ff2f')

build() {
    cd "${_pkgname}-${pkgver}"
    python -m build -wn
}

package() {
    cd "${_pkgname}-${pkgver}"
    python -m installer --destdir="$pkgdir" dist/*.whl
    install -D -m644 license.txt "${pkgdir}/usr/share/licenses/${pkgname}/license.txt"
}

check() {
    cd "${_pkgname}-${pkgver}"
    PYTHONPATH=. pytest tests
}