summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 130053b36a12c4e4069c8dc20856fb71e9b6342c (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
# shellcheck disable=SC2034,2154,2148
# Maintainer: atomicfs <https://aur.archlinux.org/account/atomicfs>

pkgname=python-drf-writable-nested
pkgver=0.7.0
pkgrel=3
pkgdesc="Writable nested model serializer for Django REST Framework"
arch=('any')
url="https://github.com/beda-software/drf-writable-nested"
license=('BSD-2-Clause')
depends=(
  'git'
  'python'
  'python-django'
  'python-django-rest-framework'
)
makedepends=(
  'python-build'
  'python-installer'
  'python-wheel'
)
checkdepends=(
  'python-pytest'
  'python-pytest-django'
)
source=("${pkgname}::git+${url}#tag=v${pkgver}")
sha256sums=('SKIP')

check() {
  cd "${srcdir}/${pkgname}"
  pytest
}

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

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

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