aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-identify/APKBUILD
blob: 341dd1b2fd6db6ad5d2f9d88e32036698c4671d9 (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
# Contributor: Galen Abell <galen@galenabell.com>
# Maintainer: Galen Abell <galen@galenabell.com>
pkgname=py3-identify
_pyname=identify
pkgver=2.5.35
pkgrel=1
pkgdesc="File identification library for Python"
url="https://github.com/pre-commit/identify"
arch="noarch"
license="MIT"
depends="py3-ukkonen"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$_pyname-$pkgver.tar.gz::https://github.com/pre-commit/identify/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/$_pyname-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
1d01535f95818533220c06988eb2d9f495c004b41fd197482ab0e3520f81ab2aebce0344dffeb0449423abd6574c21043fa0ad20472b3aaff6cb97986f31fd88  identify-2.5.35.tar.gz
"