# Copyright 2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # pybind11 binding to sci-libs/ctranslate2, the module faster-whisper # and whisperx import. Built from the python/ directory of the same # GitHub tarball against the installed library of the same version. # setup.py hard-codes an rpath into /usr/local for the wheel; dropped, # the library is in the default search path here. EAPI=8 DISTUTILS_USE_PEP517=setuptools PYTHON_COMPAT=( python3_{12..14} ) inherit distutils-r1 DESCRIPTION="Python binding to the CTranslate2 inference engine" HOMEPAGE="https://opennmt.net/CTranslate2 https://github.com/OpenNMT/CTranslate2 https://pypi.org/project/ctranslate2/" SRC_URI="https://github.com/OpenNMT/CTranslate2/archive/refs/tags/v${PV}.tar.gz -> CTranslate2-${PV}.gh.tar.gz" S="${WORKDIR}/CTranslate2-${PV}/python" LICENSE="MIT" SLOT="0" KEYWORDS="~amd64" # The tests download models and need torch, transformers and the # upstream training frameworks. RESTRICT="test" RDEPEND=" ~sci-libs/ctranslate2-${PV} dev-python/numpy[${PYTHON_USEDEP}]