add: tokenizers (#9083) (#9143)

(cherry picked from commit 6582842fd9)

Signed-off-by: Owen-sz <owen@fyralabs.com>
Co-authored-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com>
This commit is contained in:
Raboneko
2026-01-12 16:44:04 -08:00
committed by GitHub
parent 50bb5f9cc0
commit 4f39d0f144
3 changed files with 57 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
project pkg {
rpm {
spec = "tokenizers.spec"
}
}
@@ -0,0 +1,51 @@
%global pypi_name tokenizers
%global _desc Fast State-of-the-Art Tokenizers optimized for Research and Production.
Name: python-%{pypi_name}
Version: 0.22.2
Release: 1%?dist
Summary: Fast State-of-the-Art Tokenizers optimized for Research and Production
License: Apache-2.0
URL: https://github.com/huggingface/tokenizers
Source0: %{pypi_source}
Source1: https://github.com/huggingface/tokenizers/blob/main/LICENSE
Source2: https://github.com/huggingface/tokenizers/blob/main/README.md
BuildRequires: python3-devel
BuildRequires: python3-wheel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
BuildRequires: maturin
BuildRequires: gcc-c++
Packager: Owen Zimmerman <owen@fyralabs.com>
%description
%_desc
%package -n python3-%{pypi_name}
Summary: %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}
%description -n python3-%{pypi_name}
%_desc
%prep
%autosetup -n tokenizers-%{version}
cp %{SOURCE1} .
cp %{SOURCE2} .
%build
%pyproject_wheel
%install
%pyproject_install
%pyproject_save_files tokenizers
%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.md
%license LICENSE
%changelog
* Sat Jan 10 2026 Owen Zimmerman <owen@fyralabs.com>
- Initial commit
+1
View File
@@ -0,0 +1 @@
rpm.version(pypi("tokenizers"));