aboutsummaryrefslogtreecommitdiffstats
path: root/main/py3-imagesize/APKBUILD
blob: ee31cc88fe414f08fe10162dd74fda1f1bb9f9d2 (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: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=py3-imagesize
pkgver=1.4.1
pkgrel=4
pkgdesc="Getting image size from png/jpeg/jpeg2000/gif file"
url="https://github.com/shibukawa/imagesize_py"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/i/imagesize/imagesize-$pkgver.tar.gz"
builddir="$srcdir/imagesize-$pkgver"

replaces="py-imagesize" # Backwards compatibility
provides="py-imagesize=$pkgver-r$pkgrel" # Backwards compatibility

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

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest -v \
		--deselect=test/test_get_filelike.py
}

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

sha512sums="
f191d7fe34a01ab21b0f4f6519df8ab2a53c1ca54956f4d825d9cec5bd5f4c569491bdc26cb36fcaad2c453c35e51f69379f091362e206453aaefbda4802daa4  imagesize-1.4.1.tar.gz
"