summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2569fccf27d9ef3700d06806c210f7a14cb08578 (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: None <UNKNOWN>
# Contributor: None
# Python package author: Marco Edward Gorelli <UNKNOWN>

pkgname=python-auto-walrus
_name=${pkgname#python-}
_download=${_name//-/_}
pkgver=0.2.2
pkgrel=1
pkgdesc='A tool and pre-commit hook to automatically apply the awesome walrus operator.'
arch=(any)
url="https://github.com/MarcoGorelli/auto-walrus"
license=(MIT)
depends=()
makedepends=(python-build python-installer python-wheel python-pytest)
source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_download-$pkgver.tar.gz)
sha256sums=('c7125868e6fb428089b9b7a68ce46969058f3fd732c07203e745a3fc75bb8b67')

build() {
  cd $_download-$pkgver
  python -m build --wheel --no-isolation
}

check() {
  cd "$srcdir/$_download-$pkgver"
  pytest
}

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