File python-chromadb.spec of Package python-chromadb
#
# spec file for package python-chromadb
#
# 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/
#
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
%{?sle15_python_module_pythons}
Name: python-chromadb%{psuffix}
Version: 0.5.15
Release: 0
Summary: Chroma - the open-source embedding database
License: Apache-2.0
URL: https://github.com/chroma-core/chroma
Source: https://files.pythonhosted.org/packages/source/c/chromadb/chromadb-%{version}.tar.gz
BuildRequires: python-rpm-macros
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools >= 61.0}
BuildRequires: %{python_module setuptools_scm >= 6.2}
%if %{with test}
# SECTION test requirements
BuildRequires: %{python_module pytest >= 0.48.9}
BuildRequires: %{python_module bcrypt >= 4.0.1}
BuildRequires: %{python_module build >= 1.0.3}
BuildRequires: %{python_module chroma-hnswlib == 0.7.6}
BuildRequires: %{python_module fastapi >= 0.95.2}
BuildRequires: %{python_module grpcio >= 1.58.0}
BuildRequires: %{python_module httpx >= 0.27.0}
BuildRequires: %{python_module importlib-resources}
BuildRequires: %{python_module kubernetes >= 28.1.0}
BuildRequires: %{python_module mmh3 >= 4.0.1}
BuildRequires: %{python_module numpy1 >= 1.22.5}
BuildRequires: %{python_module onnxruntime >= 1.14.1}
BuildRequires: %{python_module opentelemetry-api >= 1.2.0}
BuildRequires: %{python_module opentelemetry-exporter-otlp-proto-grpc >= 1.2.0}
BuildRequires: %{python_module opentelemetry-instrumentation-fastapi >= 0.41b0}
BuildRequires: %{python_module opentelemetry-sdk >= 1.2.0}
BuildRequires: %{python_module orjson >= 3.9.12}
BuildRequires: %{python_module overrides >= 7.3.1}
BuildRequires: %{python_module posthog >= 2.4.0}
BuildRequires: %{python_module pydantic >= 1.9}
BuildRequires: %{python_module PyPika >= 0.48.9}
BuildRequires: %{python_module PyYAML >= 6.0.0}
BuildRequires: %{python_module rich >= 10.11.0}
BuildRequires: %{python_module tenacity >= 8.2.3}
BuildRequires: %{python_module tokenizers >= 0.13.2}
BuildRequires: %{python_module tqdm >= 4.65.0}
BuildRequires: %{python_module typer >= 0.9.0}
BuildRequires: %{python_module typing_extensions >= 4.5.0}
BuildRequires: %{python_module uvicorn >= 0.18.3}
# /SECTION
%endif
BuildRequires: fdupes
Requires: python-bcrypt >= 4.0.1
Requires: python-build >= 1.0.3
Requires: python-chroma-hnswlib == 0.7.6
Requires: python-fastapi >= 0.95.2
Requires: python-grpcio >= 1.58.0
Requires: python-httpx >= 0.27.0
Requires: python-importlib-resources
Requires: python-kubernetes >= 28.1.0
Requires: python-mmh3 >= 4.0.1
Requires: python-numpy >= 1.22.5
Requires: python-onnxruntime >= 1.14.1
Requires: python-opentelemetry-api >= 1.2.0
Requires: python-opentelemetry-exporter-otlp-proto-grpc >= 1.2.0
Requires: python-opentelemetry-instrumentation-fastapi >= 0.41b0
Requires: python-opentelemetry-sdk >= 1.2.0
Requires: python-orjson >= 3.9.12
Requires: python-overrides >= 7.3.1
Requires: python-posthog >= 2.4.0
Requires: python-pydantic >= 1.9
Requires: python-PyPika >= 0.48.9
Requires: python-PyYAML >= 6.0.0
Requires: python-rich >= 10.11.0
Requires: python-tenacity >= 8.2.3
Requires: python-tokenizers >= 0.13.2
Requires: python-tqdm >= 4.65.0
Requires: python-typer >= 0.9.0
Requires: python-typing_extensions >= 4.5.0
Requires: python-uvicorn >= 0.18.3
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages
%description
Chroma is the AI-native open-source vector database.
Chroma makes it easy to build LLM apps by making knowledge, facts, and skills pluggable for LLMs.
%prep
%autosetup -p1 -n chromadb-%{version}
%build
%pyproject_wheel
%install
%if ! %{with test}
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/chroma
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%check
%if %{with test}
%pytest
%endif
%post
%python_install_alternative chroma
%postun
%python_uninstall_alternative chroma
%if ! %{with test}
%files %{python_files}
%doc README.md
%license LICENSE
%python_alternative %{_bindir}/chroma
%{python_sitelib}/chromadb
%{python_sitelib}/chromadb-%{version}.dist-info
%endif
%changelog