forked from pool/python-tiktoken
Accepting request 1198537 from home:yeey:OpenWebUI
- Release v0.7.0 * Support for gpt-4o * Performance improvements OBS-URL: https://build.opensuse.org/request/show/1198537 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tiktoken?expand=0&rev=1
This commit is contained in:
69
python-tiktoken.spec
Normal file
69
python-tiktoken.spec
Normal file
@@ -0,0 +1,69 @@
|
||||
#
|
||||
# spec file for package python-tiktoken
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-tiktoken
|
||||
Version: 0.7.0
|
||||
Release: 0
|
||||
Summary: Fast BPE tokeniser for use with OpenAI's models
|
||||
License: MIT
|
||||
URL: https://github.com/openai/tiktoken
|
||||
Source: https://files.pythonhosted.org/packages/source/t/tiktoken/tiktoken-%{version}.tar.zst
|
||||
Source1: vendor.tar.zst
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module setuptools-rust}
|
||||
BuildRequires: %{python_module wheel}
|
||||
# For testing
|
||||
BuildRequires: %{python_module hypothesis}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module regex}
|
||||
BuildRequires: %{python_module requests}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: zstd
|
||||
Requires: regex
|
||||
Requires: requests
|
||||
Requires: rust
|
||||
Requires: cargo
|
||||
Requires: rustc
|
||||
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
Fast Byte Pair Encoding (BPE) tokeniser for use with OpenAI's models.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -a1 -n tiktoken-%{version}
|
||||
|
||||
%build
|
||||
export CFLAGS="%{optflags}"
|
||||
%pyproject_wheel
|
||||
|
||||
%check
|
||||
# NOTE: don't run the tests as they required internet access.
|
||||
|
||||
%install
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
||||
|
||||
%files %{python_files}
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
%{python_sitearch}/tiktoken*
|
||||
|
||||
%changelog
|
Reference in New Issue
Block a user