makedeb


python3-huggingface-hub 0.23.4-0


All the open source things related to the Hugging Face Hub

Viewing /PKGBUILD.

View raw.

Click here to go back to the Git tree for python3-huggingface-hub.

# Maintainer: exponential <echo ZXhwb25lbnRpYWxtYXRyaXhAcHJvdG9ubWFpbC5jb20K | base64 -d>
# Contributor: Butui Hu (AUR) <hot123tea123@gmail.com>
_pkgname=huggingface_hub
pkgname=python3-huggingface-hub
pkgver=0.23.4
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=('3cb68ac3271dfa76fdd8b26a5338f0e5883927f5346b848f675d59cd71032c5061b295e8376f5b9f2ce7e38a4fc65da6b9bc49bf1413b4598055222a5c1e0945')

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: