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

pkgname=python-ipware
pkgver=3.0.0
pkgrel=3
pkgdesc="Returns the best matched IP address from a given HTTP(s) header in Python"
arch=('any')
url="https://github.com/un33k/python-ipware"
license=('MIT')
makedepends=(
  'git'
  'python-build'
  'python-installer'
  'python-setuptools'
)
conflicts=(
  'python-django-ipware'
)
source=("${pkgname}::git+${url}#tag=v${pkgver}")
sha256sums=('SKIP')

check() {
  cd "${srcdir}/${pkgname}"
  ./test.sh
}

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

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

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