# automatically generated by g-sorcery
# please do not edit this file

EAPI=8

REALNAME="${PN}"
LITERALNAME="${PN}"
REALVERSION="${PV}"
DIGEST_SOURCES="yes"
PYTHON_COMPAT=( python{3_11,3_12,3_13,3_14} )
DISTUTILS_USE_PEP517=standalone

inherit python-r1 gs-pypi

DESCRIPTION="Python bindings for the Transformer models implemented in C/C++ using GGML library."

HOMEPAGE="https://github.com/marella/ctransformers"
LICENSE="MIT"
SRC_URI="https://files.pythonhosted.org/packages/source/${REALNAME::1}/${REALNAME}/${REALNAME}-${REALVERSION}.tar.gz"
SOURCEFILE="${REALNAME}-${REALVERSION}.tar.gz"
RESTRICT="test"

SLOT="0"
KEYWORDS="~amd64 ~x86"

IUSE="cuda gptq tests"
DEPENDENCIES="dev-python/huggingface-hub[${PYTHON_USEDEP}]
	<dev-python/py-cpuinfo-10.0.0[${PYTHON_USEDEP}]
	cuda? ( dev-python/nvidia-cublas-cu12[${PYTHON_USEDEP}] )
	cuda? ( dev-python/nvidia-cuda-runtime-cu12[${PYTHON_USEDEP}] )
	gptq? ( dev-python/exllama[${PYTHON_USEDEP}] )
	tests? ( dev-python/pytest[${PYTHON_USEDEP}] )"
BDEPEND="${DEPENDENCIES}"
RDEPEND="${DEPENDENCIES}"