openai/tiktoken

Public

mirrored from https://github.com/openai/tiktokenAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
0.6.0

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

pyproject.toml

45lines · modecode

1[project]
2name = "tiktoken"
3version = "0.6.0"
4description = "tiktoken is a fast BPE tokeniser for use with OpenAI's models"
5readme = "README.md"
6license = {file = "LICENSE"}
7authors = [{name = "Shantanu Jain"}, {email = "shantanu@openai.com"}]
8dependencies = ["regex>=2022.1.18", "requests>=2.26.0"]
9optional-dependencies = {blobfile = ["blobfile>=2"]}
10requires-python = ">=3.8"
11
12[project.urls]
13homepage = "https://github.com/openai/tiktoken"
14repository = "https://github.com/openai/tiktoken"
15changelog = "https://github.com/openai/tiktoken/blob/main/CHANGELOG.md"
16
17[build-system]
18build-backend = "setuptools.build_meta"
19requires = ["setuptools>=62.4", "wheel", "setuptools-rust>=1.5.2"]
20
21[tool.cibuildwheel]
22build-frontend = "build"
23build-verbosity = 1
24
25linux.before-all = "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y"
26linux.environment = { PATH = "$PATH:$HOME/.cargo/bin" }
27macos.before-all = "rustup target add aarch64-apple-darwin"
28
29skip = [
30 "*-manylinux_i686",
31 "*-musllinux_i686",
32 "*-win32",
33]
34macos.archs = ["x86_64", "arm64"]
35# When cross-compiling on Intel, it is not possible to test arm64 wheels.
36# Warnings will be silenced with following CIBW_TEST_SKIP
37test-skip = "*-macosx_arm64"
38
39before-test = "pip install pytest hypothesis"
40test-command = "pytest {project}/tests --import-mode=append"
41
42[[tool.cibuildwheel.overrides]]
43select = "*linux_aarch64"
44test-command = """python -c 'import tiktoken; enc = tiktoken.get_encoding("gpt2"); assert enc.encode("hello world") == [31373, 995]'"""
45
46