summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 378acb7895afcc6c1bc30b95e5570900fee0364f (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
# Maintainer: Xeonacid <h.dwwwwww@gmail.com>

_name=eth-tester
pkgname=python-${_name}
pkgver=0.12.0b2
pkgrel=1
pkgdesc="Tool suite for testing ethereum applications."
arch=(any)
url="https://github.com/ethereum/${_name}"
license=(MIT)
depends=(python python-eth-abi python-eth-account python-eth-keys python-eth-typing python-eth-utils python-rlp python-semantic-version python-toolz python-hexbytes python-py-evm)
makedepends=(python-build python-installer python-setuptools python-wheel)
checkdepends=(python-pytest)
# hyphen in git tag, hard to automated upgrade
source=(https://files.pythonhosted.org/packages/source/${_name::1}/${_name//-/_}/${_name//-/_}-$pkgver.tar.gz)
sha512sums=('034d6696b88ea1f777b0383da398576fba4a5d6ed181be41cbb4da82d83fdccfbd459bea561f477502a65898945091a0b19d461981cb9a0359a82f5d40306cd0')

build() {
  cd ${_name//-/_}-$pkgver
  python -m build --wheel --no-isolation
}

check(){
  cd ${_name//-/_}-$pkgver
  python -m venv --system-site-packages test-env
  test-env/bin/python -m installer dist/*.whl
  test-env/bin/python -m pytest -vv --showlocals tests/
}

package() {
  cd ${_name//-/_}-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
  install -Dm644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
}