File python-huggingface-hub.spec of Package python-huggingface-hub

#
# spec file for package python-huggingface_hub
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-huggingface_hub
Version:        0.23.4
Release:        0
Summary:        Client library to download and publish models, datasets and other repos on the huggingfaceco hub
License:        Apache-2.0
URL:            https://github.com/huggingface/huggingface_hub
Source:         https://github.com/huggingface/huggingface_hub/archive/refs/tags/v%{version}.tar.gz#/huggingface_hub-%{version}.tar.gz
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{python_module filelock}
BuildRequires:  %{python_module fsspec >= 2023.5.0}
BuildRequires:  %{python_module packaging >= 20.9}
BuildRequires:  %{python_module PyYAML >= 5.1}
BuildRequires:  %{python_module requests}
BuildRequires:  %{python_module tqdm >= 4.42.1}
BuildRequires:  %{python_module typing-extensions >= 3.7.4.3}
BuildRequires:  fdupes
Requires:       python-filelock
Requires:       python-fsspec >= 2023.5.0
Requires:       python-packaging >= 20.9
Requires:       python-PyYAML >= 5.1
Requires:       python-requests
Requires:       python-tqdm >= 4.42.1
Requires:       python-typing-extensions >= 3.7.4.3
Suggests:       python-InquirerPy == 0.3.4
Suggests:       python-aiohttp
Suggests:       python-minijinja >= 1.0
Suggests:       python-jedi
Suggests:       python-Jinja2
Suggests:       python-pytest
Suggests:       python-pytest-cov
Suggests:       python-pytest-env
Suggests:       python-pytest-xdist
Suggests:       python-pytest-vcr
Suggests:       python-pytest-asyncio
Suggests:       python-pytest-rerunfailures
Suggests:       python-urllib3 < 2.0
Suggests:       python-soundfile
Suggests:       python-Pillow
Suggests:       python-gradio
Suggests:       python-numpy
Suggests:       python-fastapi
Suggests:       python-ruff >= 0.3.0
Suggests:       python-mypy == 1.5.1
Suggests:       python-typing-extensions >= 4.8.0
Suggests:       python-types-PyYAML
Suggests:       python-types-requests
Suggests:       python-types-simplejson
Suggests:       python-types-toml
Suggests:       python-types-tqdm
Suggests:       python-types-urllib3
Suggests:       python-InquirerPy == 0.3.4
Suggests:       python-InquirerPy == 0.3.4
Suggests:       python-aiohttp
Suggests:       python-minijinja >= 1.0
Suggests:       python-jedi
Suggests:       python-Jinja2
Suggests:       python-pytest
Suggests:       python-pytest-cov
Suggests:       python-pytest-env
Suggests:       python-pytest-xdist
Suggests:       python-pytest-vcr
Suggests:       python-pytest-asyncio
Suggests:       python-pytest-rerunfailures
Suggests:       python-urllib3 < 2.0
Suggests:       python-soundfile
Suggests:       python-Pillow
Suggests:       python-gradio
Suggests:       python-numpy
Suggests:       python-fastapi
Suggests:       python-ruff >= 0.3.0
Suggests:       python-mypy == 1.5.1
Suggests:       python-typing-extensions >= 4.8.0
Suggests:       python-types-PyYAML
Suggests:       python-types-requests
Suggests:       python-types-simplejson
Suggests:       python-types-toml
Suggests:       python-types-tqdm
Suggests:       python-types-urllib3
Suggests:       python-toml
Suggests:       python-fastai >= 2.4
Suggests:       python-fastcore >= 1.3.27
Suggests:       python-hf_transfer >= 0.1.4
Suggests:       python-aiohttp
Suggests:       python-minijinja >= 1.0
Suggests:       python-ruff >= 0.3.0
Suggests:       python-mypy == 1.5.1
Suggests:       python-tensorflow
Suggests:       python-pydot
Suggests:       python-graphviz
Suggests:       python-tensorflow
Suggests:       python-keras < 3.0
Suggests:       python-InquirerPy == 0.3.4
Suggests:       python-aiohttp
Suggests:       python-minijinja >= 1.0
Suggests:       python-jedi
Suggests:       python-Jinja2
Suggests:       python-pytest
Suggests:       python-pytest-cov
Suggests:       python-pytest-env
Suggests:       python-pytest-xdist
Suggests:       python-pytest-vcr
Suggests:       python-pytest-asyncio
Suggests:       python-pytest-rerunfailures
Suggests:       python-urllib3 < 2.0
Suggests:       python-soundfile
Suggests:       python-Pillow
Suggests:       python-gradio
Suggests:       python-numpy
Suggests:       python-fastapi
Suggests:       python-torch
Suggests:       python-safetensors
Suggests:       python-typing-extensions >= 4.8.0
Suggests:       python-types-PyYAML
Suggests:       python-types-requests
Suggests:       python-types-simplejson
Suggests:       python-types-toml
Suggests:       python-types-tqdm
Suggests:       python-types-urllib3
BuildArch:      noarch
%python_subpackages

%description
Client library to download and publish models, datasets and other repos on the huggingface.co hub

%prep
%setup -q -n huggingface_hub-%{version}

%build
%python_build

%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/huggingface-cli
%python_expand %fdupes %{buildroot}%{$python_sitelib}

%post
%python_install_alternative huggingface-cli

%postun
%python_uninstall_alternative huggingface-cli

%files %{python_files}
%python_alternative %{_bindir}/huggingface-cli
%{python_sitelib}/*

%changelog
openSUSE Build Service is sponsored by