upgpkg: ufw 0.36.2-1
[ArchLinux/community.git] / python-puremagic / trunk / PKGBUILD
blob65da01dfcbcaf72514d67d41760f7493f1a292c0
1 # Maintainer: George Rawlinson <grawlinson@archlinux.org>
3 pkgname=python-puremagic
4 pkgver=1.15
5 pkgrel=1
6 pkgdesc="A Python module that will identify a file based off it's magic numbers"
7 arch=('any')
8 url='https://github.com/cdgriffith/puremagic'
9 license=('MIT')
10 depends=('python')
11 makedepends=(
12   'git'
13   'python-build'
14   'python-installer'
15   'python-setuptools'
16   'python-wheel'
18 checkdepends=('python-pytest')
19 _commit='ff042db17e7477bbabcb9c5b7e8562a697f6b1cb'
20 source=("$pkgname::git+$url#commit=$_commit")
21 b2sums=('SKIP')
23 pkgver() {
24   cd "$pkgname"
26   git describe --tags | sed 's/^v//'
29 build() {
30   cd "$pkgname"
32   python -m build --wheel --no-isolation
35 check() {
36   cd "$pkgname"
38   PYTHONPATH="$PWD:$PYTHONPATH" pytest
41 package() {
42   cd "$pkgname"
44   python -m installer --destdir="$pkgdir" dist/*.whl
46   # license
47   install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE