# Maintainer: exponential # Contributor: Butui Hu (AUR) _pkgname=huggingface_hub pkgname=python3-huggingface-hub pkgver=0.24.6 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=('ce36d75bf8c828e2f7c4670a0654b8164eba87f9226780a5c4a949455a1eb2ec379bbae54328625b3b77f54efa2b4df4f76f6f84abb479937b543d58c91700d7') 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: