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