| 1 | # Contributor: Jakub Jirutka <[email protected]> |
| 2 | # Maintainer: Jakub Jirutka <[email protected]> |
| 3 | pkgname=py3-imagesize |
| 4 | pkgver=1.4.1 |
| 5 | pkgrel=5 |
| 6 | pkgdesc="Getting image size from png/jpeg/jpeg2000/gif file" |
| 7 | url="https://github.com/shibukawa/imagesize_py" |
| 8 | arch="noarch" |
| 9 | license="MIT" |
| 10 | depends="python3" |
| 11 | makedepends="py3-gpep517 py3-setuptools py3-wheel" |
| 12 | checkdepends="py3-pytest" |
| 13 | subpackages="$pkgname-pyc" |
| 14 | source="https://files.pythonhosted.org/packages/source/i/imagesize/imagesize-$pkgver.tar.gz" |
| 15 | builddir="$srcdir/imagesize-$pkgver" |
| 16 | |
| 17 | replaces="py-imagesize" # Backwards compatibility |
| 18 | provides="py-imagesize=$pkgver-r$pkgrel" # Backwards compatibility |
| 19 | |
| 20 | build() { |
| 21 | gpep517 build-wheel --wheel-dir .dist --output-fd 3 3>&1 >&2 |
| 22 | } |
| 23 | |
| 24 | check() { |
| 25 | python3 -m venv --clear --without-pip --system-site-packages .testenv |
| 26 | .testenv/bin/python3 -m installer .dist/*.whl |
| 27 | .testenv/bin/python3 -m pytest -v \ |
| 28 | --deselect=test/test_get_filelike.py |
| 29 | } |
| 30 | |
| 31 | package() { |
| 32 | python3 -m installer -d "$pkgdir" .dist/*.whl |
| 33 | } |
| 34 | |
| 35 | sha512sums=" |
| 36 | f191d7fe34a01ab21b0f4f6519df8ab2a53c1ca54956f4d825d9cec5bd5f4c569491bdc26cb36fcaad2c453c35e51f69379f091362e206453aaefbda4802daa4 imagesize-1.4.1.tar.gz |
| 37 | " |