File python-sentence-transformers.spec of Package python-sentence-transformers
#
# spec file for package python-sentence-transformers
#
# Copyright (c) 2025 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/
#
Name: python-sentence-transformers
Version: 5.0.0
Release: 0
Summary: Embeddings, Retrieval, and Reranking
License: Apache-2.0
URL: https://www.SBERT.net
Source: https://files.pythonhosted.org/packages/source/s/sentence-transformers/sentence_transformers-%{version}.tar.gz
Source1: https://raw.githubusercontent.com/UKPLab/sentence-transformers/refs/heads/master/tests/utils.py
BuildRequires: python-rpm-macros
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools >= 42}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
Requires: python-huggingface-hub >= 0.20.0
Requires: python-Pillow
Requires: python-scikit-learn
Requires: python-scipy
Requires: python-torch >= 1.11.0
Requires: python-tqdm
Requires: python-transformers >= 4.41.0
Requires: python-typing_extensions >= 4.5.0
Suggests: python-datasets
Suggests: python-accelerate >= 0.20.3
Suggests: python-optimum >= 1.23.1
Suggests: python-optimum >= 1.23.1
Suggests: python-optimum-intel >= 1.20.0
Suggests: python-datasets
Suggests: python-accelerate >= 0.20.3
Suggests: python-pre-commit
Suggests: python-pytest
Suggests: python-pytest-cov
Suggests: python-peft
BuildArch: noarch
%python_subpackages
%description
Embeddings, Retrieval, and Reranking
%prep
%autosetup -p1 -n sentence_transformers-%{version}
cp %{SOURCE1} tests/
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
# most of the tests need internet connection to the huggingface hub
#%%pytest
%files %{python_files}
%{python_sitelib}/sentence_transformers
%{python_sitelib}/sentence_transformers-%{version}.dist-info
%changelog