summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 125423a203afe5a53f4f39e4c6905d1e93bca7c9 (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
40
41
42
43
44
45
46
47
48
# Maintainer: a821
# Contributor: Chih-Hsuan Yen <yan12125@archlinux.org>
# Contributor: bartus
# Contributor: Rémy Oudompheng <remy@archlinux.org>
# Contributor: Dave Reisner <d@falconindy.com>

pkgname=pyalpm-git
_pkgname=${pkgname%-git}
pkgver=0.11.1.r0.g2c7917a
pkgrel=1
pkgdesc="Libalpm bindings for Python 3 (Git version)"
arch=('x86_64')
url="https://gitlab.archlinux.org/archlinux/pyalpm"
license=('GPL-3.0-only')
depends=('python' 'pacman')
makedepends=(
  'git'
  'meson-python'
  'python-build'
  'python-installer'
  'python-wheel'
)
checkdepends=('python-pytest' 'python-pytest-pacman')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("git+${url}.git")
sha256sums=('SKIP')

pkgver() {
  cd $_pkgname
  git describe --long --tags 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

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

check() {
  meson setup build $_pkgname
  meson compile -C build
  meson test -C build
}

package() {
  cd $_pkgname
  python -m installer --destdir="$pkgdir" dist/*.whl
}