summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 64644fa59d5b0a7e09c55ef8497f12fd9629fabb (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: Carlos Aznarán <caznaranl@uni.pe>
# Contributor: acxz <akashpatel2008@yahoo.com>
_base=flake8-builtins
pkgname=python-${_base}
pkgver=3.1.0
pkgrel=1
pkgdesc="Check for python builtins being used as variables or parameters"
arch=(any)
url="https://github.com/gforcada/${_base}"
license=(GPL-2.0-or-later)
depends=(flake8)
makedepends=(python-build python-installer python-hatchling python-wheel)
checkdepends=(python-pytest)
source=(${_base}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz)
sha512sums=('b0371f28a8db9dea74b4b46adcd279f0c5028a8cd64db911d64180797b84742f74a453b62a98018f5f3bc2228334a1d3092fbc5b766dcdbecea486fdcd5f2649')

build() {
  cd ${_base}-${pkgver}
  python -m build --wheel --skip-dependency-check --no-isolation
}

check() {
  cd ${_base}-${pkgver}
  python -m venv --system-site-packages test-env
  test-env/bin/python -m installer dist/*.whl
  test-env/bin/python -m pytest run_tests.py
}

package() {
  cd ${_base}-${pkgver}
  PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python -m installer --destdir="${pkgdir}" dist/*.whl
  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}