summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7cc473863088810882a7a8bd160209f7829a4e2e (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
# Maintainer: Blair Bonnett <blair.bonnett@gmail.com>

pkgname=python-pytest-gitconfig
pkgdesc='A gitconfig sandbox for testing'
pkgver=0.7.0
pkgrel=1
url='https://github.com/noirbizarre/pytest-gitconfig'
arch=('any')
license=('MIT')

depends=('python-pytest')
makedepends=('python-build' 'python-installer' 'python-pdm-backend')
checkdepends=('git')

_pypi=pytest_gitconfig
source=(
  "https://files.pythonhosted.org/packages/source/${_pypi::1}/$_pypi/$_pypi-$pkgver.tar.gz"
)
sha256sums=(
  '7d8a49747c09da0416704e911d4eccecbae11a28f997cdeba77aab9ab4975b1f'
)

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

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

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