# Maintainer: Luis Martinez # Contributor: Brad Ackerman pkgname=python-msoffcrypto-tool _pkg="${pkgname#python-}" pkgver=5.0.0 pkgrel=2 pkgdesc='A Python tool and library for decrypting encrypted MS Office files' arch=('any') url='https://github.com/nolze/msoffcrypto-tool' license=('MIT') depends=('python-olefile' 'python-cryptography' 'python-setuptools') makedepends=('python-build' 'python-installer' 'python-poetry-core' 'python-wheel') source=("$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/${_pkg::1}/$_pkg/$_pkg-$pkgver.tar.gz") sha256sums=('34cbdb3efe62d9ca08aa59aadb1dc7d46a8ec2fb4befb89807f2d3c00b9c3ede') build() { cd "$_pkg-$pkgver" python -m build --wheel --no-isolation } package() { cd "$_pkg-$pkgver" PYTHONHASHSEED=0 python -m installer --destdir="$pkgdir" dist/*.whl local _site="$(python -c 'import site; print(site.getsitepackages()[0])')" install -d "$pkgdir/usr/share/licenses/$pkgname/" ln -s "$_site/${_pkg/-/_}-$pkgver.dist-info/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" }