From cbefa0bad35df78cd22363366ba7ae9092704879 Mon Sep 17 00:00:00 2001 From: Li Guan Date: Mon, 27 Apr 2026 10:24:52 +0800 Subject: [PATCH 1/5] SPECS: Add python-sacrebleu. Signed-off-by: Li Guan --- SPECS/python-sacrebleu/python-sacrebleu.spec | 44 ++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 SPECS/python-sacrebleu/python-sacrebleu.spec diff --git a/SPECS/python-sacrebleu/python-sacrebleu.spec b/SPECS/python-sacrebleu/python-sacrebleu.spec new file mode 100644 index 000000000..8792efc70 --- /dev/null +++ b/SPECS/python-sacrebleu/python-sacrebleu.spec @@ -0,0 +1,44 @@ +# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors +# SPDX-FileContributor: Li Guan +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname sacrebleu + +Name: python-%{srcname} +Version: 2.6.0 +Release: %autorelease +Summary: Hassle-free computation of shareable, comparable, and reproducible BLEU, chrF, and TER scores +License: Apache-2.0 +URL: https://github.com/mjpost/sacrebleu +#!RemoteAsset: sha256:91499b6cd46138d95154fff1e863c2f9be57e82f0c719d8dd718d0006cf6c566 +Source0: https://files.pythonhosted.org/packages/source/s/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch +BuildSystem: pyproject + +BuildOption(install): -l %{srcname} + +BuildRequires: pyproject-rpm-macros +BuildRequires: pkgconfig(python3) + +Provides: python3-%{srcname} = %{version}-%{release} +%python_provide python3-%{srcname} + +%description +SacreBLEU (Post, 2018) provides hassle-free computation of +shareable, comparable, and reproducible BLEU scores. Inspired +by Rico Sennrich's multi-bleu-detok.perl, it produces the official +WMT scores but works with plain text. It also knows all the standard +test sets and handles downloading, processing, and tokenization for you. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc README.md +%license LICENSE.txt +%{_bindir}/sacrebleu + +%changelog +%autochangelog From 9619fe355968ec69cf9a988075ce29a7448150c0 Mon Sep 17 00:00:00 2001 From: Li Guan Date: Mon, 27 Apr 2026 11:26:29 +0800 Subject: [PATCH 2/5] SPECS: Add python-absl-py. Signed-off-by: Li Guan --- SPECS/python-absl-py/python-absl-py.spec | 42 ++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 SPECS/python-absl-py/python-absl-py.spec diff --git a/SPECS/python-absl-py/python-absl-py.spec b/SPECS/python-absl-py/python-absl-py.spec new file mode 100644 index 000000000..0fdd78426 --- /dev/null +++ b/SPECS/python-absl-py/python-absl-py.spec @@ -0,0 +1,42 @@ +# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors +# SPDX-FileContributor: Li Guan +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname absl-py +%global pypi_name absl_py + +Name: python-%{srcname} +Version: 2.4.0 +Release: %autorelease +Summary: Abseil Common Libraries (Python) +License: Apache-2.0 +URL: https://github.com/abseil/abseil-py +#!RemoteAsset: sha256:8c6af82722b35cf71e0f4d1d47dcaebfff286e27110a99fc359349b247dfb5d4 +Source0: https://files.pythonhosted.org/packages/source/a/%{srcname}/%{pypi_name}-%{version}.tar.gz +BuildArch: noarch +BuildSystem: pyproject + +BuildOption(install): -l absl + +BuildRequires: pyproject-rpm-macros +BuildRequires: pkgconfig(python3) + +Provides: python3-%{srcname} = %{version}-%{release} +%python_provide python3-%{srcname} + +%description +This repository is a collection of Python library code +for building Python applications. The code is collected from Google's +own Python code base, and has been extensively tested and used in production. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc README.md +%license LICENSE + +%changelog +%autochangelog From 50eff1e3b22a320ec56b95ee294f14c4cd8f9cce Mon Sep 17 00:00:00 2001 From: Li Guan Date: Mon, 27 Apr 2026 21:06:37 +0800 Subject: [PATCH 3/5] SPECS: Add python-xgrammar. Signed-off-by: Li Guan --- SPECS/python-xgrammar/python-xgrammar.spec | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 SPECS/python-xgrammar/python-xgrammar.spec diff --git a/SPECS/python-xgrammar/python-xgrammar.spec b/SPECS/python-xgrammar/python-xgrammar.spec new file mode 100644 index 000000000..5ec6e7731 --- /dev/null +++ b/SPECS/python-xgrammar/python-xgrammar.spec @@ -0,0 +1,53 @@ +# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors +# SPDX-FileContributor: Li Guan +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname xgrammar + +Name: python-%{srcname} +Version: 0.1.33 +Release: %autorelease +Summary: Fast, Flexible and Portable Structured Generation +License: Apache-2.0 +URL: https://github.com/mlc-ai/xgrammar +#!RemoteAsset: sha256:8dbe5fc3d76651ab1fac7a68fc2a118b885fa0ec7189927fb6e0dce0081aea99 +Source0: https://files.pythonhosted.org/packages/source/x/%{srcname}/%{srcname}-%{version}.tar.gz +BuildSystem: pyproject + +BuildOption(install): -l %{srcname} -L +# No module named 'triton' +BuildOption(check): -e xgrammar.kernels.apply_token_bitmask_inplace_triton +BuildOption(check): -e xgrammar.kernels.apply_token_bitmask_inplace_cuda +# No module named 'mlx' +BuildOption(check): -e xgrammar.kernels.apply_token_bitmask_mlx +BuildOption(check): -e xgrammar.contrib.mlxlm + +BuildRequires: pyproject-rpm-macros +BuildRequires: pkgconfig(python3) +BuildRequires: cmake +BuildRequires: ninja + +Provides: python3-%{srcname} = %{version}-%{release} +Provides: python3-%{srcname}%{?_isa} = %{version}-%{release} +%python_provide python3-%{srcname} + +%description +Efficient, Flexible and Portable Structured Generation. + +%prep -a +sed -i 's/nanobind==2\.5\.0/nanobind>=2.5.0/g' pyproject.toml +sed -i 's/-Werror//g' CMakeLists.txt +# Exclude x86-only Triton dependency for RISC-V compatibility. +sed -i '/triton/d' pyproject.toml + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc README.md +%license LICENSE + +%changelog +%autochangelog From f80167095b6e5428f37c8dd2ab335af8f116a553 Mon Sep 17 00:00:00 2001 From: Li Guan Date: Wed, 29 Apr 2026 22:30:37 +0800 Subject: [PATCH 4/5] SPECS: Add python-sacremoses. Signed-off-by: Li Guan --- .../python-sacremoses/python-sacremoses.spec | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 SPECS/python-sacremoses/python-sacremoses.spec diff --git a/SPECS/python-sacremoses/python-sacremoses.spec b/SPECS/python-sacremoses/python-sacremoses.spec new file mode 100644 index 000000000..1cd460e47 --- /dev/null +++ b/SPECS/python-sacremoses/python-sacremoses.spec @@ -0,0 +1,42 @@ +# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors +# SPDX-FileContributor: Li Guan +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname sacremoses + +Name: python-%{srcname} +Version: 0.1.1 +Release: %autorelease +Summary: Python port of Moses tokenizer, truecaser and normalizer +License: MIT +URL: https://github.com/hplt-project/sacremoses +#!RemoteAsset: sha256:b6fd5d3a766b02154ed80b962ddca91e1fd25629c0978c7efba21ebccf663934 +Source0: https://files.pythonhosted.org/packages/source/s/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch +BuildSystem: pyproject + +BuildOption(install): -l %{srcname} +# Not Implemented +BuildOption(check): -e sacremoses.sent_tokenize + +BuildRequires: pyproject-rpm-macros +BuildRequires: pkgconfig(python3) + +Provides: python3-%{srcname} = %{version}-%{release} +%python_provide python3-%{srcname} + +%description +Python port of Moses tokenizer, truecaser and normalizer. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc README.md +%license LICENSE +%{_bindir}/sacremoses + +%changelog +%autochangelog From e972a91a20199889a4cd4d403f6a104d8f0a7b96 Mon Sep 17 00:00:00 2001 From: Li Guan Date: Wed, 29 Apr 2026 22:30:50 +0800 Subject: [PATCH 5/5] SPECS: Add python-schedulefree. Signed-off-by: Li Guan --- .../python-schedulefree.spec | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 SPECS/python-schedulefree/python-schedulefree.spec diff --git a/SPECS/python-schedulefree/python-schedulefree.spec b/SPECS/python-schedulefree/python-schedulefree.spec new file mode 100644 index 000000000..a5f78df6a --- /dev/null +++ b/SPECS/python-schedulefree/python-schedulefree.spec @@ -0,0 +1,42 @@ +# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors +# SPDX-FileContributor: Li Guan +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname schedulefree + +Name: python-%{srcname} +Version: 1.4.1 +Release: %autorelease +Summary: Schedule Free Learning in PyTorch +License: Apache-2.0 +URL: https://github.com/facebookresearch/schedule_free +#!RemoteAsset: sha256:69ef25601d1fc0d8dd00cb36f9af78833f88b7846f1bb6ddecc9f144f3e9f7cb +Source0: https://files.pythonhosted.org/packages/source/s/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch +BuildSystem: pyproject + +BuildOption(install): -l %{srcname} +# No module named 'algoperf' +BuildOption(check): -e schedulefree.algoperf.external_tuning* +BuildOption(check): -e schedulefree.algoperf.self_tuning.schedule_free_adamw.submission + +BuildRequires: pyproject-rpm-macros +BuildRequires: pkgconfig(python3) + +Provides: python3-%{srcname} = %{version}-%{release} +%python_provide python3-%{srcname} + +%description +Schedule-Free Optimizers in PyTorch. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc README.md +%license LICENSE + +%changelog +%autochangelog