diff --git a/python-transformers.changes b/python-transformers.changes index bd7401b..7d86fbe 100644 --- a/python-transformers.changes +++ b/python-transformers.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Jul 15 06:16:37 UTC 2025 - Steve Kowalik + +- Use pyproject macros to build and install. +- Use autosetup macro. +- Dedupe the Suggests list. +- List directories explicitly under %files. + ------------------------------------------------------------------- Tue Oct 8 02:01:18 UTC 2024 - Guang Yee diff --git a/python-transformers.spec b/python-transformers.spec index 3c49b57..2e4d26e 100644 --- a/python-transformers.spec +++ b/python-transformers.spec @@ -1,7 +1,7 @@ # # spec file for package python-transformers # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,399 +25,104 @@ License: Apache-2.0 URL: https://github.com/huggingface/transformers Source: https://github.com/huggingface/transformers/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Source99: python-transformers.rpmlintrc -Patch0: 0001-Remove-upper-bound-for-tokenizers.patch -BuildRequires: python-rpm-macros -BuildRequires: %{python_module setuptools} +Patch0: 0001-Remove-upper-bound-for-tokenizers.patch +BuildRequires: %{python_module PyYAML >= 5.1} BuildRequires: %{python_module filelock} BuildRequires: %{python_module huggingface-hub >= 0.23.2} BuildRequires: %{python_module numpy >= 1.17} BuildRequires: %{python_module packaging >= 20.0} -BuildRequires: %{python_module PyYAML >= 5.1} +BuildRequires: %{python_module pip} BuildRequires: %{python_module regex} BuildRequires: %{python_module requests} BuildRequires: %{python_module safetensors >= 0.4.1} +BuildRequires: %{python_module setuptools} BuildRequires: %{python_module tokenizers >= 0.19} +BuildRequires: %{python_module torch} BuildRequires: %{python_module tqdm >= 4.27} +BuildRequires: %{python_module wheel} BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-PyYAML >= 5.1 Requires: python-filelock Requires: python-huggingface-hub >= 0.23.2 Requires: python-numpy >= 1.17 Requires: python-packaging >= 20.0 -Requires: python-PyYAML >= 5.1 Requires: python-regex Requires: python-requests Requires: python-safetensors >= 0.4.1 Requires: python-tokenizers >= 0.19 Requires: python-tqdm >= 4.27 Suggests: python-accelerate >= 0.21.0 +Suggests: python-av = 9.2.0 +Suggests: python-beautifulsoup4 +Suggests: python-codecarbon = 1.2.0 +Suggests: python-datasets +Suggests: python-decord = 0.6.0 +Suggests: python-deepspeed >= 0.9.3 Suggests: python-diffusers -Suggests: python-accelerate >= 0.21.0 -Suggests: python-datasets -Suggests: python-torch -Suggests: python-sentencepiece >= 0.1.91 -Suggests: python-opencv-python -Suggests: python-Pillow >= 10.0.1 -Suggests: python-tensorflow > 2.9 -Suggests: python-onnxconverter-common -Suggests: python-tf2onnx -Suggests: python-tensorflow-text < 2.16 -Suggests: python-keras-nlp >= 0.3.1 -Suggests: python-torch -Suggests: python-accelerate >= 0.21.0 -Suggests: python-jax >= 0.4.1 -Suggests: python-jaxlib >= 0.4.1 -Suggests: python-flax >= 0.4.1 -Suggests: python-optax >= 0.0.8 -Suggests: python-scipy < 1.13.0 -Suggests: python-sentencepiece >= 0.1.91 -Suggests: python-protobuf -Suggests: python-tokenizers >= 0.19 -Suggests: python-torchaudio -Suggests: python-librosa -Suggests: python-pyctcdecode >= 0.4.0 -Suggests: python-phonemizer -Suggests: python-kenlm -Suggests: python-Pillow >= 10.0.1 -Suggests: python-optuna -Suggests: python-ray >= 2.7.0 -Suggests: python-sigopt -Suggests: python-timm <= 0.9.16 -Suggests: python-torchvision -Suggests: python-Pillow >= 10.0.1 -Suggests: python-codecarbon == 1.2.0 -Suggests: python-accelerate >= 0.21.0 -Suggests: python-decord == 0.6.0 -Suggests: python-av == 9.2.0 -Suggests: python-librosa -Suggests: python-pyctcdecode >= 0.4.0 -Suggests: python-phonemizer -Suggests: python-kenlm -Suggests: python-optimum-benchmark >= 0.2.0 -Suggests: python-codecarbon == 1.2.0 -Suggests: python-deepspeed >= 0.9.3 -Suggests: python-accelerate >= 0.21.0 -Suggests: python-deepspeed >= 0.9.3 -Suggests: python-accelerate >= 0.21.0 -Suggests: python-pytest >= 7.2.0 -Suggests: python-pytest-rich -Suggests: python-pytest-xdist -Suggests: python-timeout-decorator -Suggests: python-parameterized -Suggests: python-psutil -Suggests: python-datasets -Suggests: python-dill < 0.3.5 -Suggests: python-evaluate >= 0.2.0 -Suggests: python-pytest-timeout -Suggests: python-ruff == 0.4.4 -Suggests: python-sacrebleu >= 1.4.12 -Suggests: python-rouge-score -Suggests: python-nltk -Suggests: python-GitPython < 3.1.19 -Suggests: python-sacremoses -Suggests: python-rjieba -Suggests: python-beautifulsoup4 -Suggests: python-tensorboard -Suggests: python-pydantic -Suggests: python-sentencepiece >= 0.1.91 Suggests: python-faiss-cpu -Suggests: python-datasets -Suggests: python-cookiecutter == 1.7.3 -Suggests: python-optuna -Suggests: python-sentencepiece >= 0.1.91 -Suggests: python-protobuf -Suggests: python-tensorflow > 2.9 -Suggests: python-onnxconverter-common -Suggests: python-tf2onnx -Suggests: python-tensorflow-text < 2.16 -Suggests: python-keras-nlp >= 0.3.1 -Suggests: python-torch -Suggests: python-accelerate >= 0.21.0 -Suggests: python-jax >= 0.4.1 -Suggests: python-jaxlib >= 0.4.1 -Suggests: python-flax >= 0.4.1 -Suggests: python-optax >= 0.0.8 -Suggests: python-scipy < 1.13.0 -Suggests: python-sentencepiece >= 0.1.91 -Suggests: python-protobuf -Suggests: python-tokenizers >= 0.19 -Suggests: python-torchaudio -Suggests: python-librosa -Suggests: python-pyctcdecode >= 0.4.0 -Suggests: python-phonemizer -Suggests: python-kenlm -Suggests: python-Pillow >= 10.0.1 -Suggests: python-optuna -Suggests: python-ray >= 2.7.0 -Suggests: python-sigopt -Suggests: python-timm <= 0.9.16 -Suggests: python-torchvision -Suggests: python-Pillow >= 10.0.1 -Suggests: python-codecarbon == 1.2.0 -Suggests: python-accelerate >= 0.21.0 -Suggests: python-decord == 0.6.0 -Suggests: python-av == 9.2.0 -Suggests: python-pytest >= 7.2.0 -Suggests: python-pytest-rich -Suggests: python-pytest-xdist -Suggests: python-timeout-decorator -Suggests: python-parameterized -Suggests: python-psutil -Suggests: python-datasets -Suggests: python-dill < 0.3.5 -Suggests: python-evaluate >= 0.2.0 -Suggests: python-pytest-timeout -Suggests: python-ruff == 0.4.4 -Suggests: python-sacrebleu >= 1.4.12 -Suggests: python-rouge-score -Suggests: python-nltk -Suggests: python-GitPython < 3.1.19 -Suggests: python-sacremoses -Suggests: python-rjieba -Suggests: python-beautifulsoup4 -Suggests: python-tensorboard -Suggests: python-pydantic -Suggests: python-sentencepiece >= 0.1.91 -Suggests: python-faiss-cpu -Suggests: python-datasets -Suggests: python-cookiecutter == 1.7.3 -Suggests: python-datasets -Suggests: python-isort >= 5.5.4 -Suggests: python-ruff == 0.4.4 -Suggests: python-GitPython < 3.1.19 -Suggests: python-urllib3 < 2.0.0 -Suggests: python-fugashi >= 1.0 -Suggests: python-ipadic >= 1.0.0 -Suggests: python-unidic_lite >= 1.0.7 -Suggests: python-unidic >= 1.0.2 -Suggests: python-sudachipy >= 0.6.6 -Suggests: python-sudachidict_core >= 20220729 -Suggests: python-rhoknp >= 1.1.0 -Suggests: python-scikit-learn -Suggests: python-cookiecutter == 1.7.3 -Suggests: python-pytest >= 7.2.0 -Suggests: python-pytest-rich -Suggests: python-pytest-xdist -Suggests: python-timeout-decorator -Suggests: python-parameterized -Suggests: python-psutil -Suggests: python-datasets -Suggests: python-dill < 0.3.5 -Suggests: python-evaluate >= 0.2.0 -Suggests: python-pytest-timeout -Suggests: python-ruff == 0.4.4 -Suggests: python-sacrebleu >= 1.4.12 -Suggests: python-rouge-score -Suggests: python-nltk -Suggests: python-GitPython < 3.1.19 -Suggests: python-sacremoses -Suggests: python-rjieba -Suggests: python-beautifulsoup4 -Suggests: python-tensorboard -Suggests: python-pydantic -Suggests: python-sentencepiece >= 0.1.91 -Suggests: python-faiss-cpu -Suggests: python-datasets -Suggests: python-cookiecutter == 1.7.3 -Suggests: python-tensorflow > 2.9 -Suggests: python-onnxconverter-common -Suggests: python-tf2onnx -Suggests: python-tensorflow-text < 2.16 -Suggests: python-keras-nlp >= 0.3.1 -Suggests: python-sentencepiece >= 0.1.91 -Suggests: python-protobuf -Suggests: python-tokenizers >= 0.19 -Suggests: python-Pillow >= 10.0.1 -Suggests: python-datasets -Suggests: python-isort >= 5.5.4 -Suggests: python-ruff == 0.4.4 -Suggests: python-GitPython < 3.1.19 -Suggests: python-urllib3 < 2.0.0 -Suggests: python-scikit-learn -Suggests: python-cookiecutter == 1.7.3 -Suggests: python-onnxconverter-common -Suggests: python-tf2onnx -Suggests: python-onnxruntime >= 1.4.0 -Suggests: python-onnxruntime-tools >= 1.4.2 -Suggests: python-librosa -Suggests: python-pyctcdecode >= 0.4.0 -Suggests: python-phonemizer -Suggests: python-kenlm -Suggests: python-pytest >= 7.2.0 -Suggests: python-pytest-rich -Suggests: python-pytest-xdist -Suggests: python-timeout-decorator -Suggests: python-parameterized -Suggests: python-psutil -Suggests: python-datasets -Suggests: python-dill < 0.3.5 -Suggests: python-evaluate >= 0.2.0 -Suggests: python-pytest-timeout -Suggests: python-ruff == 0.4.4 -Suggests: python-sacrebleu >= 1.4.12 -Suggests: python-rouge-score -Suggests: python-nltk -Suggests: python-GitPython < 3.1.19 -Suggests: python-sacremoses -Suggests: python-rjieba -Suggests: python-beautifulsoup4 -Suggests: python-tensorboard -Suggests: python-pydantic -Suggests: python-sentencepiece >= 0.1.91 -Suggests: python-faiss-cpu -Suggests: python-datasets -Suggests: python-cookiecutter == 1.7.3 -Suggests: python-torch -Suggests: python-accelerate >= 0.21.0 -Suggests: python-sentencepiece >= 0.1.91 -Suggests: python-protobuf -Suggests: python-tokenizers >= 0.19 -Suggests: python-torchaudio -Suggests: python-librosa -Suggests: python-pyctcdecode >= 0.4.0 -Suggests: python-phonemizer -Suggests: python-kenlm -Suggests: python-Pillow >= 10.0.1 -Suggests: python-optuna -Suggests: python-ray >= 2.7.0 -Suggests: python-sigopt -Suggests: python-timm <= 0.9.16 -Suggests: python-torchvision -Suggests: python-Pillow >= 10.0.1 -Suggests: python-codecarbon == 1.2.0 -Suggests: python-datasets -Suggests: python-isort >= 5.5.4 -Suggests: python-ruff == 0.4.4 -Suggests: python-GitPython < 3.1.19 -Suggests: python-urllib3 < 2.0.0 -Suggests: python-fugashi >= 1.0 -Suggests: python-ipadic >= 1.0.0 -Suggests: python-unidic_lite >= 1.0.7 -Suggests: python-unidic >= 1.0.2 -Suggests: python-sudachipy >= 0.6.6 -Suggests: python-sudachidict_core >= 20220729 -Suggests: python-rhoknp >= 1.1.0 -Suggests: python-scikit-learn -Suggests: python-cookiecutter == 1.7.3 -Suggests: python-onnxruntime >= 1.4.0 -Suggests: python-onnxruntime-tools >= 1.4.2 -Suggests: python-jax >= 0.4.1 -Suggests: python-jaxlib >= 0.4.1 -Suggests: python-flax >= 0.4.1 -Suggests: python-optax >= 0.0.8 -Suggests: python-scipy < 1.13.0 -Suggests: python-librosa -Suggests: python-pyctcdecode >= 0.4.0 -Suggests: python-phonemizer -Suggests: python-kenlm -Suggests: python-ftfy -Suggests: python-optuna -Suggests: python-ray >= 2.7.0 -Suggests: python-sigopt -Suggests: python-fugashi >= 1.0 -Suggests: python-ipadic >= 1.0.0 -Suggests: python-unidic_lite >= 1.0.7 -Suggests: python-unidic >= 1.0.2 -Suggests: python-sudachipy >= 0.6.6 -Suggests: python-sudachidict_core >= 20220729 -Suggests: python-rhoknp >= 1.1.0 -Suggests: python-cookiecutter == 1.7.3 -Suggests: python-natten >= 0.14.6 -Suggests: python-onnxconverter-common -Suggests: python-tf2onnx -Suggests: python-onnxruntime >= 1.4.0 -Suggests: python-onnxruntime-tools >= 1.4.2 -Suggests: python-onnxruntime >= 1.4.0 -Suggests: python-onnxruntime-tools >= 1.4.2 -Suggests: python-optuna -Suggests: python-datasets -Suggests: python-isort >= 5.5.4 -Suggests: python-ruff == 0.4.4 -Suggests: python-GitPython < 3.1.19 -Suggests: python-urllib3 < 2.0.0 -Suggests: python-ray >= 2.7.0 -Suggests: python-faiss-cpu -Suggests: python-datasets -Suggests: python-ruff == 0.4.4 -Suggests: python-sagemaker >= 2.31.0 -Suggests: python-sentencepiece >= 0.1.91 -Suggests: python-protobuf -Suggests: python-pydantic -Suggests: python-uvicorn Suggests: python-fastapi -Suggests: python-starlette -Suggests: python-sigopt -Suggests: python-scikit-learn -Suggests: python-torchaudio -Suggests: python-librosa -Suggests: python-pyctcdecode >= 0.4.0 -Suggests: python-phonemizer -Suggests: python-kenlm -Suggests: python-pytest >= 7.2.0 -Suggests: python-pytest-rich -Suggests: python-pytest-xdist -Suggests: python-timeout-decorator -Suggests: python-parameterized -Suggests: python-psutil -Suggests: python-datasets -Suggests: python-dill < 0.3.5 -Suggests: python-evaluate >= 0.2.0 -Suggests: python-pytest-timeout -Suggests: python-ruff == 0.4.4 -Suggests: python-sacrebleu >= 1.4.12 -Suggests: python-rouge-score -Suggests: python-nltk -Suggests: python-GitPython < 3.1.19 -Suggests: python-sacremoses -Suggests: python-rjieba -Suggests: python-beautifulsoup4 -Suggests: python-tensorboard -Suggests: python-pydantic -Suggests: python-sentencepiece >= 0.1.91 -Suggests: python-faiss-cpu -Suggests: python-datasets -Suggests: python-cookiecutter == 1.7.3 -Suggests: python-tensorflow > 2.9 -Suggests: python-onnxconverter-common -Suggests: python-tf2onnx -Suggests: python-tensorflow-text < 2.16 -Suggests: python-keras-nlp >= 0.3.1 -Suggests: python-keras > 2.9 -Suggests: python-tensorflow-cpu > 2.9 -Suggests: python-onnxconverter-common -Suggests: python-tf2onnx -Suggests: python-tensorflow-text < 2.16 -Suggests: python-keras-nlp >= 0.3.1 -Suggests: python-tensorflow-probability < 0.24 -Suggests: python-librosa -Suggests: python-pyctcdecode >= 0.4.0 -Suggests: python-phonemizer -Suggests: python-kenlm -Suggests: python-timm <= 0.9.16 -Suggests: python-tokenizers >= 0.19 -Suggests: python-torch -Suggests: python-accelerate >= 0.21.0 -Suggests: python-torchaudio -Suggests: python-librosa -Suggests: python-pyctcdecode >= 0.4.0 -Suggests: python-phonemizer -Suggests: python-kenlm -Suggests: python-torchvision -Suggests: python-Pillow >= 10.0.1 Suggests: python-filelock +Suggests: python-flax >= 0.4.1 +Suggests: python-ftfy +Suggests: python-fugashi >= 1.0 +Suggests: python-GitPython < 3.1.19 Suggests: python-huggingface_hub >= 0.23.2 Suggests: python-importlib_metadata +Suggests: python-ipadic >= 1.0.0 +Suggests: python-jax >= 0.4.1 +Suggests: python-jaxlib >= 0.4.1 +Suggests: python-kenlm +Suggests: python-keras > 2.9 +Suggests: python-keras-nlp >= 0.3.1 +Suggests: python-librosa +Suggests: python-natten >= 0.14.6 +Suggests: python-nltk Suggests: python-numpy >= 1.17 +Suggests: python-onnxconverter-common +Suggests: python-onnxruntime >= 1.4.0 +Suggests: python-onnxruntime-tools >= 1.4.2 +Suggests: python-opencv-python +Suggests: python-optax >= 0.0.8 +Suggests: python-optimum-benchmark >= 0.2.0 +Suggests: python-optuna Suggests: python-packaging >= 20.0 +Suggests: python-phonemizer Suggests: python-protobuf +Suggests: python-psutil +Suggests: python-pyctcdecode >= 0.4.0 +Suggests: python-pydantic +Suggests: python-ray >= 2.7.0 Suggests: python-regex Suggests: python-requests +Suggests: python-rhoknp >= 1.1.0 +Suggests: python-rjieba +Suggests: python-rouge-score +Suggests: python-sacrebleu >= 1.4.12 +Suggests: python-sacremoses +Suggests: python-sagemaker >= 2.31.0 +Suggests: python-scikit-learn +Suggests: python-scipy < 1.13.0 Suggests: python-sentencepiece >= 0.1.91 -Suggests: python-torch +Suggests: python-starlette +Suggests: python-sudachidict_core >= 20220729 +Suggests: python-sudachipy >= 0.6.6 +Suggests: python-tensorboard +Suggests: python-tensorflow > 2.9 +Suggests: python-tensorflow-cpu > 2.9 +Suggests: python-tensorflow-probability < 0.24 +Suggests: python-tensorflow-text < 2.16 +Suggests: python-timeout-decorator +Suggests: python-timm <= 0.9.16 Suggests: python-tokenizers >= 0.19 +Suggests: python-torch +Suggests: python-torchaudio +Suggests: python-torchvision Suggests: python-tqdm >= 4.27 -Suggests: python-decord == 0.6.0 -Suggests: python-av == 9.2.0 -Suggests: python-Pillow >= 10.0.1 +Suggests: python-unidic >= 1.0.2 +Suggests: python-unidic_lite >= 1.0.7 +Suggests: python-urllib3 < 2.0.0 +Suggests: python-uvicorn BuildArch: noarch %python_subpackages @@ -427,25 +132,23 @@ different modalities such as text, vision, and audio. These models can be applied on: * Text, for tasks like text classification, information extraction, question answering, summarization, translation, and text generation, in over 100 - languages. + languages. * Images, for tasks like image classification, object detection, and segmentation. * Audio, for tasks like speech recognition and audio classification. - %prep -%setup -q -n transformers-%{version} -%autopatch -p1 +%autosetup -p1 -n transformers-%{version} # fix shebang find . -name \*.py -type f -exec \ sed -i "s|^#!\s*%{_bindir}/env python|#!%{_bindir}/python3|" {} \; %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_clone -a %{buildroot}%{_bindir}/transformers-cli %python_expand %fdupes %{buildroot}%{$python_sitelib} @@ -459,6 +162,7 @@ find . -name \*.py -type f -exec \ %doc README.md %license LICENSE %python_alternative %{_bindir}/transformers-cli -%{python_sitelib}/* +%{python_sitelib}/transformers +%{python_sitelib}/transformers-%{version}.dist-info %changelog