2024-09-13 12:16:36 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-chroma-hnswlib
|
|
|
|
|
#
|
|
|
|
|
# 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/
|
|
|
|
|
#
|
|
|
|
|
|
2024-09-17 13:44:30 +00:00
|
|
|
|
2024-09-13 12:16:36 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
|
|
|
|
Name: python-chroma-hnswlib
|
2024-10-10 15:35:30 +00:00
|
|
|
Version: 0.7.6
|
2024-09-13 12:16:36 +00:00
|
|
|
Release: 0
|
|
|
|
|
Summary: Chromas fork of hnswlib
|
|
|
|
|
License: Apache-2.0
|
|
|
|
|
URL: https://github.com/chroma-core/hnswlib
|
2024-09-18 09:13:21 +00:00
|
|
|
Source: https://github.com/chroma-core/hnswlib/archive/refs/tags/%{version}.tar.gz#/chroma_hnswlib-%{version}.tar.gz
|
2024-09-13 12:16:36 +00:00
|
|
|
Group: Development/Languages/Python
|
|
|
|
|
BuildRequires: %{python_module numpy >= 1.10.0}
|
|
|
|
|
BuildRequires: %{python_module pip}
|
|
|
|
|
BuildRequires: %{python_module pybind11-devel >= 2.10.0}
|
|
|
|
|
BuildRequires: %{python_module setuptools >= 42}
|
|
|
|
|
BuildRequires: %{python_module wheel}
|
2024-09-17 13:44:30 +00:00
|
|
|
BuildRequires: gcc-c++
|
|
|
|
|
BuildRequires: python-rpm-macros
|
2024-09-13 12:16:36 +00:00
|
|
|
# SECTION test requirements
|
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
|
# /SECTION
|
|
|
|
|
BuildRequires: fdupes
|
2024-11-19 15:03:24 +00:00
|
|
|
Requires: python-numpy >= 1.10.0
|
2024-09-13 12:16:36 +00:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Chroma-Hnswlib - fast approximate nearest neighbor search
|
|
|
|
|
|
|
|
|
|
%prep
|
2024-09-18 09:13:21 +00:00
|
|
|
%autosetup -p1 -n hnswlib-%{version}
|
2024-09-13 12:16:36 +00:00
|
|
|
|
|
|
|
|
%build
|
2024-09-24 09:02:57 +00:00
|
|
|
export HNSWLIB_NO_NATIVE=1
|
2024-09-13 12:16:36 +00:00
|
|
|
export CFLAGS="%{optflags}"
|
|
|
|
|
%pyproject_wheel
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%pyproject_install
|
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
2024-09-17 13:44:30 +00:00
|
|
|
%python_expand rm -f %{buildroot}%{$python_sitearch}/chroma_hnswlib-0.7.5.dist-info/REQUESTED
|
2024-09-13 12:16:36 +00:00
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%python_expand export PYTHONPATH=$PYTHONPATH:%{buildroot}%{$python_sitelib}:%{buildroot}%{$python_sitearch}
|
|
|
|
|
# class method
|
|
|
|
|
donttest="test_space_main"
|
|
|
|
|
%pytest -v tests/python/bindings_test*.py -k "not ($donttest)"
|
|
|
|
|
|
|
|
|
|
%files %{python_files}
|
|
|
|
|
%doc README.md
|
|
|
|
|
%license LICENSE
|
2024-11-19 15:03:24 +00:00
|
|
|
%{python_sitearch}/hnswlib.*.so
|
|
|
|
|
%{python_sitearch}/chroma_hnswlib-%{version}.dist-info
|
2024-09-13 12:16:36 +00:00
|
|
|
|
|
|
|
|
%changelog
|