Jakub Klinkovský pushed to branch main at Arch Linux / Packaging / Packages / 
python-huggingface-hub


Commits:
ab438fbc by Jakub Klinkovský at 2025-01-26T21:42:40+01:00
upgpkg: 1:0.27.1-4

- add huggingface group
- add python-jinja and python-pillow to optdepends
- enable tests

- - - - -


2 changed files:

- .SRCINFO
- PKGBUILD


Changes:

=====================================
.SRCINFO
=====================================
@@ -1,11 +1,23 @@
 pkgbase = python-huggingface-hub
        pkgdesc = All the open source things related to the Hugging Face Hub
        pkgver = 0.27.1
-       pkgrel = 3
+       pkgrel = 4
        epoch = 1
        url = https://github.com/huggingface/huggingface_hub
        arch = any
+       groups = huggingface
        license = Apache-2.0
+       checkdepends = git
+       checkdepends = git-lfs
+       checkdepends = python-fastapi
+       checkdepends = python-jedi
+       checkdepends = python-jinja
+       checkdepends = python-pillow
+       checkdepends = python-pytest
+       checkdepends = python-pytest-asyncio
+       checkdepends = python-pytest-env
+       checkdepends = python-pytest-mock
+       checkdepends = python-pytest-vcr
        makedepends = python-build
        makedepends = python-installer
        makedepends = python-setuptools
@@ -24,6 +36,8 @@ pkgbase = python-huggingface-hub
        optdepends = python-graphviz
        optdepends = python-hf-transfer
        optdepends = python-inquirerpy
+       optdepends = python-jinja
+       optdepends = python-pillow
        optdepends = python-pydot
        optdepends = python-pytorch
        optdepends = python-safetensors


=====================================
PKGBUILD
=====================================
@@ -4,12 +4,13 @@
 _name=huggingface_hub
 pkgname=python-huggingface-hub
 pkgver=0.27.1
-pkgrel=3
+pkgrel=4
 epoch=1
 pkgdesc='All the open source things related to the Hugging Face Hub'
 arch=(any)
 url='https://github.com/huggingface/huggingface_hub'
 license=(Apache-2.0)
+groups=(huggingface)
 depends=(
   python
   python-aiohttp
@@ -28,11 +29,26 @@ makedepends=(
   python-setuptools
   python-wheel
 )
+checkdepends=(
+  git
+  git-lfs
+  python-fastapi
+  python-jedi
+  python-jinja
+  python-pillow
+  python-pytest
+  python-pytest-asyncio
+  python-pytest-env
+  python-pytest-mock
+  python-pytest-vcr
+)
 optdepends=(
   python-gradio
   python-graphviz
   python-hf-transfer
   python-inquirerpy
+  python-jinja
+  python-pillow
   python-pydot
   python-pytorch
   python-safetensors
@@ -46,6 +62,29 @@ build() {
   python -m build --wheel --no-isolation
 }
 
+check() {
+  local pytest_options=(
+    -vv
+    --override-ini="addopts="
+    -W ignore::DeprecationWarning
+    # ignore test which requires python-inquirerpy which is not packaged
+    --ignore tests/test_command_delete_cache.py
+    # skip tests that connect to the real HuggingFace Hub
+    --deselect tests/test_hf_api.py
+    # skip hanging test 
https://github.com/huggingface/huggingface_hub/issues/1973
+    --deselect 
tests/test_repository.py::TestRepositoryShared::test_clone_from_missing_repo
+    # skip tests that require gradio but are not marked as such
+    --deselect 
tests/test_webhooks_server.py::test_deserialize_payload_example_with_comment
+    --deselect 
tests/test_webhooks_server.py::test_deserialize_payload_example_without_comment
+    --deselect 
tests/test_webhooks_server.py::test_deserialize_payload_example_with_updated_refs
+  )
+
+  cd $_name-$pkgver
+  python -m venv --system-site-packages test-env
+  test-env/bin/python -m installer dist/*.whl
+  test-env/bin/python -m pytest "${pytest_options[@]}" tests
+}
+
 package() {
   cd $_name-$pkgver
   python -m installer --destdir="$pkgdir" dist/*.whl



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/python-huggingface-hub/-/commit/ab438fbc35c8e729311654a5976a1d9293c80c9b

-- 
View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/python-huggingface-hub/-/commit/ab438fbc35c8e729311654a5976a1d9293c80c9b
You're receiving this email because of your account on gitlab.archlinux.org.


Reply via email to