## START: Set by rpmautospec ## (rpmautospec version 0.8.4) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec Name: python-tiktoken Version: 0.14.0 Release: %autorelease Summary: tiktoken is a fast BPE tokeniser for use with OpenAI's models # tiktoken is MIT # # Statically linked deps and their licenses. # When updating, copy the output of %%{cargo_license_summary} from the build # log and check it still matches the License field. # # (MIT OR Apache-2.0) AND Unicode-DFS-2016 # Apache-2.0 OR MIT # MIT # MIT OR Apache-2.0 # Unlicense OR MIT License: %{shrink: MIT AND Apache-2.0 AND Unicode-DFS-2016 AND (Apache-2.0 OR MIT) AND (Unlicense OR MIT) } URL: https://pypi.org/project/tiktoken/ Source: %{pypi_source tiktoken} # Manually created patch for downstream crate metadata changes # * Allow fancy-regex 0.16 for now; upstream wants 0.17, updated from 0.13 “for # significantly increased performance.” See: # https://bugzilla.redhat.com/show_bug.cgi?id=2321464 Patch: tiktoken-fix-metadata.diff BuildRequires: python3-devel BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: tiktoken is a fast BPE tokeniser for use with OpenAI's models.} %description %_description %package -n python3-tiktoken Summary: %{summary} %description -n python3-tiktoken %_description %prep %autosetup -p1 -n tiktoken-%{version} %cargo_prep %generate_buildrequires %cargo_generate_buildrequires -f python %pyproject_buildrequires %build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %pyproject_wheel %install %pyproject_install %pyproject_save_files -l tiktoken tiktoken_ext %check %pyproject_check_import # All or nearly all tests require data files downloaded from the Internet; see # tiktoken_ext/openai_public.py. We *could* add these as additional sources, # copy them into a directory (renaming each file to the hexadecimal SHA1 digest # of its original URL), and set the TIKTOKEN_CACHE_DIR environment variable # when running the tests to use these “pre-downloaded” data files. However, not # only would this be fussy, but it means we would have to try to figure out # what licenses, if any, apply to these data files. %files -n python3-tiktoken -f %{pyproject_files} %doc README.md %changelog ## START: Generated by rpmautospec * Tue Aug 18 2026 Filipe Rosset - 0.14.0-2 - opt-in to packit for rawhide * Tue Aug 18 2026 Filipe Rosset - 0.14.0-1 - Update to 0.14.0 * Wed Jul 22 2026 Python Maint - 0.13.0-4 - Rebuilt for Python 3.15.0b4 ABI change * Thu Jul 16 2026 Fedora Release Engineering - 0.13.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild * Mon Jul 06 2026 Benjamin A. Beasley - 0.13.0-2 - Update PyO3 to 0.29 - Fixes RUSTSEC-2026-0176 and RUSTSEC-2026-0177 * Mon Jul 06 2026 Benjamin A. Beasley - 0.13.0-1 - Update to 0.13.0 (close RHBZ#2477785) * Mon Jul 06 2026 Benjamin A. Beasley - 0.12.0-6 - Add a comment to justify not running the tests * Mon Jul 06 2026 Benjamin A. Beasley - 0.12.0-5 - Avoid installing duplicate license files * Mon Jul 06 2026 Benjamin A. Beasley - 0.12.0-4 - Improve/simplify handling of Rust dependency licenses * Wed Jun 03 2026 Python Maint - 0.12.0-3 - Rebuilt for Python 3.15 * Sat Jan 17 2026 Fedora Release Engineering - 0.12.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild * Tue Oct 07 2025 Lumir Balhar - 0.12.0-1 - Update to 0.12.0 (rhbz#2402015) * Fri Sep 19 2025 Python Maint - 0.11.0-3 - Rebuilt for Python 3.14.0rc3 bytecode * Fri Aug 15 2025 Python Maint - 0.11.0-2 - Rebuilt for Python 3.14.0rc2 bytecode * Mon Aug 11 2025 Lumir Balhar - 0.11.0-1 - Update to 0.11.0 (rhbz#2386598) * Fri Jul 25 2025 Fedora Release Engineering - 0.9.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild * Tue Jun 03 2025 Python Maint - 0.9.0-2 - Rebuilt for Python 3.14 * Tue Feb 18 2025 Lumir Balhar - 0.9.0-1 - Update to 0.9.0 (rhbz#2345682) * Sat Jan 18 2025 Fedora Release Engineering - 0.8.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild * Fri Oct 04 2024 Lumir Balhar - 0.8.0-1 - Update to 0.8.0 (rhbz#2316403) * Fri Jul 19 2024 Fedora Release Engineering - 0.7.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Fri Jun 07 2024 Python Maint - 0.7.0-2 - Rebuilt for Python 3.13 * Thu May 30 2024 Peter Robinson - 0.7.0-1 - Update to 0.7.0 * Fri Feb 09 2024 Lumir Balhar - 0.6.0-1 - Update to 0.6.0 (rhbz#2263478) * Fri Jan 26 2024 Fedora Release Engineering - 0.5.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 0.5.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sun Dec 03 2023 Lumir Balhar - 0.5.2-1 - Update to 0.5.2 (rhbz#2252639) * Tue Nov 07 2023 Lumir Balhar - 0.5.1-1 - Initial import (fedora#2245590). ## END: Generated by rpmautospec