dev-python/curated-tokenizers - 0.0.10 (tatsh-overlay)

Search

Install

Install this version:

emerge -a =dev-python/curated-tokenizers-0.0.10

If this version is masked, you can unmask it using the autounmask tool or standard emerge options:

autounmask =dev-python/curated-tokenizers-0.0.10

Or alternatively:

emerge --autounmask-write -a =dev-python/curated-tokenizers-0.0.10

Package Information

Description:
Lightweight piece tokenization library
Homepage:
https://github.com/explosion/curated-tokenizers
License:
MIT

Ebuild Details

Version EAPI Keywords Slot
0.0.10 8 ~amd64 0
View Raw Ebuild
# Copyright 2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{10..15} )

inherit distutils-r1

DESCRIPTION="Lightweight piece tokenization library"
HOMEPAGE="https://github.com/explosion/curated-tokenizers"
SRC_URI="https://github.com/explosion/${PN}/archive/refs/tags/release-v${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}-release-v${PV}"

PATCHES=(
	"${FILESDIR}/${PN}-cython-3.3.patch"
	"${FILESDIR}/${PN}-system-deps.patch"
	"${FILESDIR}/${PN}-system-headers.patch"
)

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"

DEPEND="dev-cpp/abseil-cpp:=
	dev-libs/protobuf:=
	sci-ml/sentencepiece"
RDEPEND="${DEPEND}
	>=dev-python/regex-2022[${PYTHON_USEDEP}]"
BDEPEND=">=dev-python/cython-3.0[${PYTHON_USEDEP}]"

src_prepare() {
	distutils-r1_src_prepare
	# >=dev-cpp/abseil-cpp-20260107 headers need C++20
	sed -i 's/--std=c++17/--std=c++20/' setup.py || die
}

src_test() {
	# Import the built extensions rather than the source-tree package, which holds the tests.
	mv "${PN//-/_}/tests" tests || die
	rm -r "${PN//-/_}" || die
	distutils-r1_src_test
}

EPYTEST_PLUGINS=()
distutils_enable_tests pytest

Inherited Eclasses

Dependencies

DEPEND

dev-cpp/abseil-cpp:=
	dev-libs/protobuf:=
	sci-ml/sentencepiece

RDEPEND

dev-cpp/abseil-cpp:=
	dev-libs/protobuf:=
	sci-ml/sentencepiece
	>=dev-python/regex-2022[]

BDEPEND

>=dev-python/cython-3.0[]

Manifest for 0.0.10

Type File Size Source URLs
DIST curated-tokenizers-0.0.10.tar.gz 175188 bytes https://github.com/explosion/curated-tokenizers/archive/refs/tags/release-v0.0.10.tar.gz