# Maintainer: samarthj # Contributor: Levente Polyak # shellcheck disable=2034,2148,2154 pkgbase=pyexiftool _pkgname=PyExifTool pkgname='python-pyexiftool' pkgver=0.4.13 pkgrel=1 pkgdesc="Library to communicate with an instance of ExifTool command-line application" arch=('any') url="https://github.com/sylikc/${pkgbase}" license=("GPL3") makedepends=("python-pip") _pkgname_prefix="${_pkgname:0:1}" _pkgname_underscored="${_pkgname//-/_}" _pkgurl="https://files.pythonhosted.org/packages/py3/$_pkgname_prefix/$_pkgname/$_pkgname_underscored-$pkgver-py3-none-any.whl" source=("$_pkgurl") sha512sums=('2e90f51e53d77088612635342ba950241a5d8eb7452ff9fefa8e934ca9701c0993d3be3547b4c43c6652b8ceea737fcd08f046895bb22a5802663866b7a9461c') package() { cd "$srcdir" || exit PIP_CONFIG_FILE=/dev/null pip install \ --root="$pkgdir" \ --isolated \ --ignore-installed \ --no-deps \ --no-compile \ --no-warn-script-location \ ${_pkgname//-/_}-$pkgver-py3-none-any.whl python -O -m compileall -s "$pkgdir" "$pkgdir/usr/lib/" mapfile -t direct_url_file < <(find "$pkgdir"/usr/lib -type f -name 'direct_url.json') rm -rvf "${direct_url_file[@]}" || true install -Dm644 "${_pkgname//-/_}-$pkgver.dist-info/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" }