summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6fd1e6f32264b59b3c41313c8233012e3d22ff1d (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: Kino <cybao292261@163.com>

pkgname=python-objprint
_pkgname=objprint
pkgver=0.3.0
pkgrel=1
pkgdesc='A library that can print Python objects in human readable format.'
arch=('x86_64')
url="https://github.com/gaogaotiantian/objprint"
license=('Apache-2.0')
depends=('python')
makedepends=(
  'python-wheel'
  'python-build'
  'python-installer'
)
checkdepends=(
  python-setuptools
)
source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/gaogaotiantian/${_pkgname}/archive/${pkgver}.tar.gz")
sha256sums=('5d7e7fefb9f562bbfaa2585f83b58da1c0ffd3a8d9534dcbd3ccb6ab956424ab')

build() {
  cd "$srcdir/$_pkgname-$pkgver" || exit

  python -m build --wheel --no-isolation
}

check() {
  cd "$srcdir/$_pkgname-$pkgver" || exit

  PYTHONPATH="$PWD/src:$PYTHONPATH" python -m unittest
}

package() {
  cd "$srcdir/$_pkgname-$pkgver" || exit
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/python-$_pkgname/LICENSE"
}