# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DISTUTILS_USE_PEP517=poetry
DISTUTILS_SINGLE_IMPL=1

PYTHON_COMPAT=( python3_{10..15} )
inherit distutils-r1 pypi

DESCRIPTION="Fast, light, accurate library built for retrieval embedding generation"
HOMEPAGE="https://github.com/qdrant/fastembed"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"

RDEPEND="
	sci-ml/huggingface_hub[${PYTHON_SINGLE_USEDEP}]
	$(python_gen_cond_dep '
		dev-python/numpy[${PYTHON_USEDEP}]
		dev-python/tqdm[${PYTHON_USEDEP}]
		sci-libs/onnxruntime[${PYTHON_USEDEP}]
		dev-python/requests[${PYTHON_USEDEP}]
		dev-python/loguru[${PYTHON_USEDEP}]
		dev-python/pillow[${PYTHON_USEDEP}]
		sci-ml/tokenizers[${PYTHON_USEDEP}]
	')"

distutils_enable_tests pytest