# Maintainer: exponential # Contributor: Butui Hu (AUR) _pkgname=huggingface_hub pkgname=python3-huggingface-hub pkgver=0.25.0 pkgrel=0 pkgdesc='All the open source things related to the Hugging Face Hub' arch=('all') url='https://github.com/huggingface/huggingface_hub' license=('Apache2') depends=('python3-filelock' 'python3-requests' 'python3-tqdm' 'python3-yaml' 'python3-typing-extensions' 'python3-packaging') optdepends=('python3-pytorch' 'python3-tensorflow') makedepends=('python3-build' 'python3-installer' 'python3-wheel' 'python3-setuptools') source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/huggingface/huggingface_hub/archive/refs/tags/v${pkgver}.tar.gz") b2sums=('b24c6507356287af55a752085a17029d34cbc9a10953e1e83be3ceb9c16ec28d0aa7a675284bac8825951d521c5a03feea77fcb0ea180e80cb525bd342cd1f7f') build() { cd "${_pkgname}-${pkgver}" python3 -m build --no-isolation --wheel } package() { cd "${_pkgname}-${pkgver}" python3 -m installer --destdir="$pkgdir" dist/*.whl #--optimize=1 --skip-build # Manual remove local mv "$pkgdir/usr/local/"* "$pkgdir/usr/" rmdir "$pkgdir/usr/local" # doc install -Dm644 "README.md" "$pkgdir/usr/share/doc/$pkgname/readme" ln -s "/usr/share/common-licenses/Apache-2.0" "${pkgdir}/usr/share/doc/$pkgname/" } # vim:set ts=2 sw=2 et: