summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3edc6843f9ff8018027a8144b3077e324ce67f02 (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: atomicfs <https://aur.archlinux.org/account/atomicfs>

pkgname=python-django-rest-framework-guardian
_pkgname=django-rest-framework-guardian
pkgver=0.5.0
pkgrel=2
pkgdesc="django-guardian support for Django REST Framework"
arch=('any')
url="https://github.com/johnthagen/django-rest-framework-guardian2"
license=('BSD-3-Clause')
depends=(
  'git'
  'python'
  'python-django'
  'python-django-rest-framework'
)
makedepends=(
  'python-build'
  'python-installer'
  'python-wheel'
)

source=("${pkgname}::git+https://github.com/johnthagen/${_pkgname}2#tag=v${pkgver}")
sha256sums=('SKIP')

#check() {}
# They use tox for testing :(

build() {
  cd "${srcdir}/${pkgname}"
  python -m build --wheel --no-isolation
}

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

  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}