%global pypi_name transformers Name: python-transformers # f44 ships tokenizers 0.22.2 and safetensors 0.7.0; 5.13.0 raised the # safetensors floor to 0.8.0 and 5.16.0 raised the tokenizers floor to 0.23.1, # so 5.12.1 is the newest release that installs there (tokenizers <=0.23.0,>=0.22.0; # safetensors >=0.4.3). f45 and rawhide have 0.23.1 / 0.8.0 and take 5.17.0. %if 0%{?fedora} >= 45 Version: 5.17.0 %else Version: 5.12.1 %endif Release: 2%{?dist} Summary: State-of-the-art machine learning for PyTorch, TensorFlow and JAX License: Apache-2.0 URL: https://github.com/huggingface/transformers Source0: %{pypi_source %{pypi_name}} BuildArch: noarch BuildRequires: python3-devel BuildRequires: pyproject-rpm-macros %global _description %{expand: Transformers provides pretrained models for text, vision, audio and multimodal tasks, together with the tokenizer, configuration and pipeline machinery to load and run them. It is backend-agnostic: PyTorch, TensorFlow and JAX are all optional, and none is required to install this package. Model weights are not included. They are downloaded from the Hugging Face Hub on first use.} %description %{_description} %package -n python3-transformers Summary: %{summary} # Not a dependency, deliberately. transformers is usable without any of them, # and which one a user wants depends entirely on the model they are running. # python3-torch is the one f45 actually has. Recommends: python3-torch %description -n python3-transformers %{_description} %prep %autosetup -n %{pypi_name}-%{version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files transformers %check # -t restricts this to the TOP-LEVEL module. The package ships 2701 python # files, and the great majority of its submodules import an optional backend at # module scope -- torch, tensorflow, jax, flax, a specific tokenizer, or a # model-specific library. Importing all of them would not test this package; it # would test which optional backends happen to be installed in the buildroot, # and would fail on every model whose extra Fedora does not carry. # # The compiled parts of this stack are NOT here: they live in the separate # tokenizers and safetensors projects, both already in f45, so there is no # extension module in this package whose load needs proving. %pyproject_check_import -t %files -n python3-transformers -f %{pyproject_files} %license LICENSE %doc README.md # The console script is declared in pyproject.toml's [project.scripts] but does # not land in %%{pyproject_files}, so it has to be listed by hand or the build # fails with "Installed (but unpackaged) file(s) found: /usr/bin/transformers". %{_bindir}/transformers %changelog * Sun Oct 04 2026 Morgan Hough - 5.12.1-2 - f44 builds 5.12.1; f45 and rawhide keep 5.17.0. The f44 builds of 5.17.0 (11074443, 11074445) failed in dependency resolution: "No match for argument: python3dist(safetensors) >= 0.8" and "nothing provides ... tokenizers >= 0.23.1", because f44 has safetensors 0.7.0 and tokenizers 0.22.2. 5.12.1 is the newest release inside both pins. Packaging newer Rust-built tokenizers and safetensors for f44 would be a wave of its own and was not attempted. - f45/rawhide are unchanged apart from the release number; they were not rebuilt. * Tue Sep 29 2026 Morgan Hough - 5.17.0-1 - Initial package: transformers 5.17.0, a dependency of Project-MONAI/monai-physio. - Pure Python, noarch: zero .c/.cpp/.cu/.pyx/.rs files in the 9.4 MB sdist, and the published wheel is py3-none-any. The compiled parts of the HuggingFace stack are in the separate tokenizers and safetensors projects, both already packaged for f45. - requires-python is ">=3.10.0" with no upper bound, so f45's Python 3.15 is in range. Its classifiers stop at 3.14, but a classifier is not a cap. - All nine core runtime dependencies were already in f45: huggingface-hub, numpy, packaging, pyyaml, regex, tokenizers, typer, safetensors, tqdm. - WATCH THE TOKENIZERS PIN. Upstream requires tokenizers >=0.23.1,<0.24.0 and f45 ships exactly 0.23.1 -- the floor. A tokenizers bump in Fedora past 0.24.0 breaks this package, and nothing in our own gates would notice until something imported it. - No backend is required. torch, tensorflow and jax are all optional extras; python3-torch is a Recommends only. - /usr/bin/transformers is listed explicitly in %%files: the entry point is declared in pyproject.toml but %%pyproject_save_files does not emit it, and the build fails on the unpackaged file without it. - %%check is -t (top level only) on purpose: most of the 2701 modules import an optional backend at module scope, so a full import sweep would test which extras are in the buildroot rather than testing this package.