1 # Maintainer: Johannes Löthberg <johannes@kyriasis.com>
2 # Maintainer: Daniel M. Capella <polyzen@archlinux.org>
4 pkgname=python-imagesize
8 pkgdesc='Analyzes JPEG/JPEG 2000/PNG/GIF/TIFF/SVG/Netpbm/WebP image headers and returns image size or DPI'
9 url='https://github.com/shibukawa/imagesize_py'
14 makedepends=('python-build' 'python-installer' 'python-setuptools'
17 source=("https://files.pythonhosted.org/packages/source/i/imagesize/imagesize-$pkgver.tar.gz")
19 sha256sums=('69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a')
23 python -m build --wheel --skip-dependency-check --no-isolation
28 python -m unittest discover -v
33 python -m installer --destdir="$pkgdir" dist/*.whl
35 # Symlink license file
36 local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
37 install -d "$pkgdir"/usr/share/licenses/$pkgname
38 ln -s "$site_packages"/imagesize-$pkgver.dist-info/LICENSE.rst \
39 "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.rst