mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-10-12 17:51:11 -04:00
dev-python/tiktoken: drop 0.13.0
Signed-off-by: Florian Albrechtskirchinger <falbrechtskirchinger@gmail.com>
This commit is contained in:
1 parent
03ea9c8e6b
commit
3838ee4178
2 files changed
-94
No files matched your search
@@ -3,8 +3,6 @@ DIST pyo3-build-config-0.29.0.crate 39616 BLAKE2B 7b62a5976b890db84e5256f3136185
|
||||
DIST pyo3-ffi-0.29.0.crate 88184 BLAKE2B 5891af92a3bcba764c4701dcc0a99edbced010a5ac46df3217d004f5c3a368f18331733c6723bd49e522c6f7105455df13e2be0f07695ed5ce6ae71c15dec438 SHA512 baaf01d13ddc09316ba16b22e9ca15a67e5bda5b861ed7961c3393fd4692fc1c96952f81465d1dcb6531b9083f96c5630981b3d7802cb1ac2af67aafaffbec76
|
||||
DIST pyo3-macros-0.29.0.crate 8915 BLAKE2B c12d23753d5aba7333183d4b41f16c8da1d4297a3ff86b3b150e9185c1978fc184ac198e566a41833292a8a78ab59446eafd5ef7169e5cb41493e7cbeaa68280 SHA512 fb6633ac76229d2e0ad88d51136a9318f03823b27c700a62cfbc957b4c834985e2f4c0cdaf5ea5e9993ec9e8ce3d63cd6b3fb823f2a042e65186adbed78da7c2
|
||||
DIST pyo3-macros-backend-0.29.0.crate 91943 BLAKE2B 7c2977dd9c80f3dd1f5375b0c65492b46048ca02e6355ad746bc8430cf92eaf25c701f416469eb69724fde5220651b1095c09eb9e3ff860176f862d7c7287407 SHA512 13a7af3958c09969637827d97ab9bbc664c407dda9e4283afaf495757798cf6f84932468bc092160fa75211ce0aafe6efc657f3a390234d77a67362cfb31fe0f
|
||||
DIST tiktoken-0.13.0-crates.tar.xz 3133548 BLAKE2B a4958dee4d87af0869202ead56213c25c5b064b3aacd5e2ff11d2cf6ed812d00e6d46c71440e06eb73b684604c5941e99a0bbd85a5208dd0299712f9af0f2221 SHA512 fc06338034ab8de5f56b62ef32e2fe8843d86a4f02da04f8ee1e0db60b18f1bce61ca6ae944de224f81b7b8951528802af8543578a48683a9592d65ffad36fdb
|
||||
DIST tiktoken-0.13.0.gh.tar.gz 35626 BLAKE2B 465489183c472e580cbb3f6ca91be2f70e7f3ff9b8ba980c89f1ceabae9056e295243e6ee35609a36c02e7ec7eb03525079aac598095c9544293c04dc55976c2 SHA512 93a1c8715bb656ea819ce73d1b2d4e4481bfdd6426379f81b366da3a868960b49255815c5a06aa9cb7ea7377f61bfa001c358051b923f509c44a1d989f66f2de
|
||||
DIST tiktoken-0.14.0-crates.tar.xz 3326608 BLAKE2B ad0620e98e659bfb83e4d22ef3580c3a317d509b267481b01ad668f301c31594534c2f40cf037e430590c7384cdab6236e77132fc61d2c0f732bcd46c0dece29 SHA512 9e4ab99b5944a8769119b0a5119e4785ef15ec0136e03c80cb0ee1e1902975e1ec92bcf578decf3c927de7189ed8fe3b4094104b17adf705e035f2589a2bbd6f
|
||||
DIST tiktoken-0.14.0.gh.tar.gz 35532 BLAKE2B f517c0c5d069fce848874cf8b12a8c0382bd91261575ba70eb52354268a0f6cd78dcc267747a345befedf25bd10a94d294a4d998a8441c034a6f6d2e093dd862 SHA512 38536b522c4f6041e4d0f69092ac77b2dfc08d3822d6663b5e19a7a21c755a0ad4ab0dce16e3374b50bea499fa8dc1bbad6eead0196e3a82c297a787588db5e7
|
||||
DIST tiktoken-encodings-v2026.03.26.tar.xz 2274968 BLAKE2B 951249a33ea830f833a404fcc3adceed08374bbd191e2f9286b660b1d6649385a252431a1d63509c8e65a2493f5df4dc2bfce0770f326993497df51260df11ec SHA512 2678bc6c35c06adb187d15a7a627f3a9e19a8aea9b83241b2cafbd4ad117f287e4a9a8f82f831712bf12bb182d20e259af88f2da9b26d3be0f0a61fd35c5d7a5
|
||||
@@ -1,92 +0,0 @@
|
||||
# Copyright 2026 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_{12..15} )
|
||||
|
||||
RUST_MIN_VER="1.85.0"
|
||||
# Bump PyO3 to 0.29.0 (RUSTSEC-2026-0176, RUSTSEC-2026-0177)
|
||||
CRATES="
|
||||
pyo3-build-config@0.29.0
|
||||
pyo3-ffi@0.29.0
|
||||
pyo3-macros-backend@0.29.0
|
||||
pyo3-macros@0.29.0
|
||||
pyo3@0.29.0
|
||||
"
|
||||
|
||||
inherit cargo distutils-r1 optfeature
|
||||
|
||||
# The encodings cache (tiktoken-encodings-*.tar.xz) holds files named after
|
||||
# the SHA-1 of their URL. It can be generated from the source directory via:
|
||||
# grep -Eo 'https://openaipublic.blob[^"]+' tiktoken_ext/openai_public.py | \
|
||||
# sort -u | while read u; do h=$(echo -n "$u" | sha1sum | awk '{print $1}'); \
|
||||
# wget -O "$h" "$u" ; done
|
||||
# Include the license file from the source repo:
|
||||
# https://github.com/openai/tiktoken/issues/92
|
||||
TTE_TAG=2026.03.26.0
|
||||
TTE_BASE_URI="https://github.com/falbrechtskirchinger/overlay-assets/releases/download"
|
||||
|
||||
DESCRIPTION="A fast BPE tokeniser for use with OpenAI's models"
|
||||
HOMEPAGE="
|
||||
https://github.com/openai/tiktoken
|
||||
https://pypi.org/project/tiktoken/
|
||||
"
|
||||
SRC_URI="
|
||||
https://github.com/openai/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.gh.tar.gz
|
||||
https://github.com/fasys-crate-dist/${PN}/releases/download/${PV}/${P}-crates.tar.xz
|
||||
${CARGO_CRATE_URIS}
|
||||
test? (
|
||||
${TTE_BASE_URI}/v${TTE_TAG}/tiktoken-encodings-v${TTE_TAG%.*}.tar.xz
|
||||
)
|
||||
"
|
||||
|
||||
LICENSE="MIT"
|
||||
# Dependent crate licenses
|
||||
LICENSE+=" Apache-2.0-with-LLVM-exceptions MIT Unicode-3.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm64"
|
||||
|
||||
RDEPEND="
|
||||
dev-python/regex[${PYTHON_USEDEP}]
|
||||
dev-python/requests[${PYTHON_USEDEP}]
|
||||
"
|
||||
BDEPEND="
|
||||
dev-python/setuptools-rust[${PYTHON_USEDEP}]
|
||||
test? (
|
||||
dev-python/blobfile[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
|
||||
QA_FLAGS_IGNORED="usr/lib.*/py.*/site-packages/tiktoken/_tiktoken.*\.so"
|
||||
|
||||
PATCHES=(
|
||||
# test_encoding.py::test_hyp_roundtrip throws ValueError for special tokens
|
||||
"${FILESDIR}/tiktoken-0.13.0-special-token-roudtrip.patch"
|
||||
)
|
||||
|
||||
EPYTEST_PLUGINS=(
|
||||
hypothesis
|
||||
pytest-{asyncio,timeout}
|
||||
)
|
||||
distutils_enable_tests pytest
|
||||
|
||||
src_prepare() {
|
||||
distutils-r1_src_prepare
|
||||
sed '/^pyo3 =/s/version = "0\.28\.3"/version = "0.29.0"/' -i Cargo.toml || die
|
||||
}
|
||||
|
||||
python_test() {
|
||||
local -x PATH=${BUILD_DIR}/install/usr/bin:${PATH}
|
||||
local -x TIKTOKEN_CACHE_DIR="${WORKDIR}/tiktoken-encodings"
|
||||
|
||||
rm -rf tiktoken || die
|
||||
|
||||
epytest
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
optfeature "reading GCS, ABS files" dev-python/blobfile
|
||||
}
|
||||
Reference in new issue
Block a user