Bug 2539211 - Review Request: python-pytorch-tokenizers - C++ implementations for various tokenizers
Summary: Review Request: python-pytorch-tokenizers - C++ implementations for various t...
Keywords:
Status: ASSIGNED
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Javier Martinez Canillas
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2547877
TreeView+ depends on / blocked
 
Reported: 2026-09-23 08:38 UTC by Peter Robinson
Modified: 2026-10-12 09:23 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Peter Robinson 2026-09-23 08:38:39 UTC
SPEC: https://pbrobinson.fedorapeople.org/python-pytorch-tokenizers.spec
SRPM: https://pbrobinson.fedorapeople.org/python-pytorch-tokenizers-1.4.1-1.fc44.src.rpm

Description:
C++ implementations for various tokenizers (sentencepiece, tiktoken etc).
Useful for other PyTorch repos such as torchchat, ExecuTorch to build LLM
runners using ExecuTorch stack or AOT Inductor stack.

FAS: pbrobinson

koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=150527840


Reproducible: Always

Comment 1 Miroslav Suchý 2026-09-24 10:52:18 UTC
> https://pbrobinson.fedorapeople.org/python-pytorch-tokenizers.spec

403 Forbidden

Comment 3 Miroslav Suchý 2026-10-09 09:52:14 UTC
Although cmake is transitively loaded, the guidelines https://docs.fedoraproject.org/en-US/packaging-guidelines/CMake/ say:

  You MUST add following BuildRequires:
  BuildRequires: cmake

Please include at least minimalistict %check using %pyproject_check_import 
https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#pyproject_check_import

> Source0: https://github.com/meta-pytorch/tokenizers/archive/1.4.1.tar.gz#/tokenizers-1.4.1.tar.gz

404 not found

Comment 4 Peter Robinson 2026-10-09 14:47:31 UTC
SPEC: https://pbrobinson.fedorapeople.org/python-pytorch-tokenizers.spec
SRPM: https://pbrobinson.fedorapeople.org/python-pytorch-tokenizers-1.4.1-3.fc44.src.rpm

koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=151070415

>   You MUST add following BuildRequires:
>   BuildRequires: cmake

Yep, that was an oversight I thought had fixed.
 
> Please include at least minimalistict %check using %pyproject_check_import 

Yes, going through and adding/testing this on all the packages I have now I'm aware of it.

> > Source0: https://github.com/meta-pytorch/tokenizers/archive/1.4.1.tar.gz#/tokenizers-1.4.1.tar.gz

Fixed

Comment 5 Javier Martinez Canillas 2026-10-12 09:23:05 UTC
I've run fedora-review and the following is the report (NOTE: it failed to
build in rawhide so I did a `fedora-review -b 2539211 -m fedora-45-x86_64`).

Following is the report:

Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated


Issues:
=======
- [!] License field is BSD-3-Clause. But sources contain Apache-2.0
  (base64.h, tiktoken.cpp) and MIT (third-party/llama.cpp-unicode/).
  License tag should be: BSD-3-Clause AND Apache-2.0 AND MIT
- [!] Header files (.h) installed inside the main python3-pytorch-tokenizers
  package under site-packages/pytorch_tokenizers/include/. These should be
  excluded from the wheel or moved to the -devel subpackage, unless they are
  needed at runtime.
- [!] Static libraries in python3-pytorch-tokenizers-devel but package
  does not Provides: python3-pytorch-tokenizers-devel-static.
- [!] Missing versioned dependency: python3-pytorch-tokenizers-devel should
  have Requires: python3-pytorch-tokenizers%{?_isa} = %{version}-%{release}
- [!] /usr/include/pytorch is not owned by any existing package. The -devel
  subpackage should own it.
- [!] %define with_tests 1 should be %global with_tests 1
- [?] third-party/llama.cpp-unicode/ is present in the source. If these files
  are bundled, a Provides: bundled(llama-cpp-unicode) is needed.

===== MUST items =====

C/C++:
[x]: Package does not contain kernel modules.
[x]: Development (unversioned) .so files in -devel subpackage, if present.
     Note: Unversioned so-files in private %_libdir subdirectory
     (pybind11 extension module). Not in ld path — OK.
[x]: If your application is a C or C++ application you must list a
     BuildRequires against gcc, gcc-c++ or clang.
[x]: Package does not contain any libtool archives (.la)
[x]: Package contains no static executables.
[x]: Rpath absent or only used for internal libs.

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[!]: License field in the package spec file matches the actual license.
     Note: Spec says BSD-3-Clause. Sources also contain Apache-2.0 and MIT.
     Should be: BSD-3-Clause AND Apache-2.0 AND MIT
[x]: License file installed when any subpackage combination is installed.
[!]: Package requires other packages for directories it uses.
     Note: No known owner of /usr/include/pytorch
[!]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/include/pytorch
     (/usr/lib64/python3.15 and site-packages are owned by python3)
[x]: %build honors applicable compiler flags or justifies otherwise.
[?]: Package contains no bundled libraries or specifies bundled libraries
     with Provides: bundled(<libname>) if unbundling is not possible.
     Note: third-party/llama.cpp-unicode/ present in sources. Verify whether
     -DTOKENIZERS_USE_SYSTEM_LIBS=ON unbundles it or if it is still compiled in.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[!]: Development files must be in a -devel package
     Note: .h files in main python3-pytorch-tokenizers package under site-packages.
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Useful -debuginfo package or justification otherwise.
[x]: Package is not known to require an ExcludeArch tag.
     Note: ExclusiveArch: aarch64 x86_64 — appropriate for this package.
[ ]: Package complies to the Packaging Guidelines
     Note: Contingent on resolving the issues listed above.
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: The License field must be a valid SPDX expression.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package must not depend on deprecated() packages.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 1537 bytes in 1 files.
[x]: Packages must not store files under /srv, /opt or /usr/local

Python:
[x]: Python eggs must not download any dependencies during the build
     process.
[x]: A package which is used by another package via an egg interface should
     provide egg info.
[x]: Package meets the Packaging Guidelines::Python
[x]: Packages MUST NOT have dependencies (either build-time or runtime) on
     packages named with the unversioned python- prefix unless no properly
     versioned package exists. Dependencies on Python packages instead MUST
     use names beginning with python2- or python3- as appropriate.
[x]: Python packages must not contain %{pythonX_site(lib|arch)}/* in %files
[x]: Binary eggs must be removed in %prep

===== SHOULD items =====

Generic:
[x]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[!]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in
     python3-pytorch-tokenizers-devel
[x]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: Upstream does not publish signatures.
[?]: %check is present and all tests pass.
     Note: Only %pyproject_check_import is run. No pytest / upstream test
     suite execution.
[x]: Packages should try to preserve timestamps of original installed
     files.
[!]: Spec use %global instead of %define unless justified.
     Note: %define with_tests 1 should be %global with_tests 1
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Package should compile and build into binary rpms on all supported
     architectures.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: python3-pytorch-tokenizers-1.4.1-3.fc45.x86_64.rpm
          python3-pytorch-tokenizers-devel-1.4.1-3.fc45.x86_64.rpm
          python-pytorch-tokenizers-1.4.1-3.fc45.src.rpm

6 errors (all spelling error false positives: sentencepiece, tiktoken,
torchchat are project names), 23 warnings (devel-file-in-non-devel-package
for .h files in site-packages, no-documentation on -devel).

Source checksums
----------------
https://github.com/meta-pytorch/tokenizers/archive/v1.4.1.tar.gz#/tokenizers-1.4.1.tar.gz :
  CHECKSUM(SHA256) this package     : c3095b5269e970863a952e6d5c0ee640388fff8219aa3112307f722304194cbd
  CHECKSUM(SHA256) upstream package : c3095b5269e970863a952e6d5c0ee640388fff8219aa3112307f722304194cbd

Generated by fedora-review 0.11.0 (05c5b26) last change: 2025-11-29
Command line :/usr/bin/fedora-review -b 2539211 -m fedora-45-x86_64
Buildroot used: fedora-45-x86_64
Active plugins: Generic, Python, Shell-api, C/C++
Disabled plugins: R, Java, PHP, Haskell, fonts, SugarActivity, Perl, Ocaml
Disabled flags: EXARCH, EPEL6, EPEL7, DISTTAG, BATCH


Note You need to log in before you can comment on or make changes to this bug.