makedeb


python3-huggingface-hub 0.24.2-0


All the open source things related to the Hugging Face Hub

Click here to go back to the commit logs for python3-huggingface-hub.

Commit:


Hash: 0f6543cfaae430e644a9422ea1fbdedcc6fe4a6a

Message: build wheel

Diff


diff --git a/.SRCINFO b/.SRCINFO
index 2bc72ce..bc13e7a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -2,7 +2,7 @@ generated-by = makedeb
 pkgname = python3-huggingface-hub
 pkgbase = python3-huggingface-hub
 pkgdesc = All the open source things related to the Hugging Face Hub
-pkgrel = 0
+pkgrel = 1
 pkgver = 0.20.2
 url = https://github.com/huggingface/huggingface_hub
 arch = all
@@ -13,7 +13,15 @@ depends = python3-yaml
 depends = python3-typing-extensions
 depends = python3-packaging
 license = Apache2
-makedepends = python3-setuptools
+makedepends = python3-build
+makedepends = python3-installer
+makedepends = python3-wheel
+optdepends = python3-pytorch
+optdepends = python3-tensorflow
 source = huggingface_hub-0.20.2.tar.gz::https://github.com/huggingface/huggingface_hub/archive/refs/tags/v0.20.2.tar.gz
 b2sums = e5305654b0710a0a6a12a124fefe46f4504d52ed421c52ad3b74871e6fa565cf5d4830753160cb455786919fd82aa06855b8643e0d1a1f11915aabf53c8efdf7
-makedepends = python3-setuptools
+makedepends = python3-build
+makedepends = python3-installer
+makedepends = python3-wheel
+optdepends = python3-pytorch
+optdepends = python3-tensorflow
diff --git a/PKGBUILD b/PKGBUILD
index 1191598..f41675d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,30 +3,37 @@
 _pkgname=huggingface_hub
 pkgname=python3-huggingface-hub
 pkgver=0.20.2
-pkgrel=0
+pkgrel=1
 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)
-makedepends=(python3-setuptools)
+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') 
 source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/huggingface/huggingface_hub/archive/refs/tags/v${pkgver}.tar.gz")
 b2sums=('e5305654b0710a0a6a12a124fefe46f4504d52ed421c52ad3b74871e6fa565cf5d4830753160cb455786919fd82aa06855b8643e0d1a1f11915aabf53c8efdf7')
 
 build() {
   cd "${_pkgname}-${pkgver}"
-  python3 setup.py build
+  python3 -m build --no-isolation --wheel
 }
 
 package() {
   cd "${_pkgname}-${pkgver}"
-  python3 setup.py install --root="${pkgdir}" --optimize=1 --skip-build --install-layout deb
-
+  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/"
 }