From 635c5c9f115539a93a89c7ff48b1565fa2738872 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 4 Jun 2021 21:14:36 +0200 Subject: [PATCH 01/26] Rebuilt for Python 3.10 --- sentencepiece.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sentencepiece.spec b/sentencepiece.spec index 1455b1b..4ce86ba 100644 --- a/sentencepiece.spec +++ b/sentencepiece.spec @@ -4,7 +4,7 @@ Name: sentencepiece Version: 0.1.92 -Release: 3%{?dist} +Release: 4%{?dist} Summary: An unsupervised text tokenizer for Neural Network-based text generation License: ASL 2.0 @@ -106,6 +106,9 @@ find %{buildroot} -name '*.a' -delete %changelog +* Fri Jun 04 2021 Python Maint - 0.1.92-4 +- Rebuilt for Python 3.10 + * Wed Jan 27 2021 Fedora Release Engineering - 0.1.92-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 8995c32babe4897a9f124f9518c94cdea074ab1b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 17:22:05 +0000 Subject: [PATCH 02/26] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- sentencepiece.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sentencepiece.spec b/sentencepiece.spec index 4ce86ba..efd8a46 100644 --- a/sentencepiece.spec +++ b/sentencepiece.spec @@ -4,7 +4,7 @@ Name: sentencepiece Version: 0.1.92 -Release: 4%{?dist} +Release: 5%{?dist} Summary: An unsupervised text tokenizer for Neural Network-based text generation License: ASL 2.0 @@ -106,6 +106,9 @@ find %{buildroot} -name '*.a' -delete %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 0.1.92-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Fri Jun 04 2021 Python Maint - 0.1.92-4 - Rebuilt for Python 3.10 From 7f15321555260726183475b5a3a5b7766a055601 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jan 2022 00:40:58 +0000 Subject: [PATCH 03/26] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- sentencepiece.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sentencepiece.spec b/sentencepiece.spec index efd8a46..4932fe4 100644 --- a/sentencepiece.spec +++ b/sentencepiece.spec @@ -4,7 +4,7 @@ Name: sentencepiece Version: 0.1.92 -Release: 5%{?dist} +Release: 6%{?dist} Summary: An unsupervised text tokenizer for Neural Network-based text generation License: ASL 2.0 @@ -106,6 +106,9 @@ find %{buildroot} -name '*.a' -delete %changelog +* Sat Jan 22 2022 Fedora Release Engineering - 0.1.92-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Fri Jul 23 2021 Fedora Release Engineering - 0.1.92-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From f1c8e4840eb15a9decb8117782524e82e8c1ec25 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 13 Jun 2022 15:22:49 +0200 Subject: [PATCH 04/26] Rebuilt for Python 3.11 --- sentencepiece.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sentencepiece.spec b/sentencepiece.spec index 4932fe4..b057f7b 100644 --- a/sentencepiece.spec +++ b/sentencepiece.spec @@ -4,7 +4,7 @@ Name: sentencepiece Version: 0.1.92 -Release: 6%{?dist} +Release: 7%{?dist} Summary: An unsupervised text tokenizer for Neural Network-based text generation License: ASL 2.0 @@ -106,6 +106,9 @@ find %{buildroot} -name '*.a' -delete %changelog +* Mon Jun 13 2022 Python Maint - 0.1.92-7 +- Rebuilt for Python 3.11 + * Sat Jan 22 2022 Fedora Release Engineering - 0.1.92-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From ce7e25e34797b8c778e71ceb7a73df47bf125558 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 23 Jul 2022 08:22:35 +0000 Subject: [PATCH 05/26] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- sentencepiece.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sentencepiece.spec b/sentencepiece.spec index b057f7b..0efb1a0 100644 --- a/sentencepiece.spec +++ b/sentencepiece.spec @@ -4,7 +4,7 @@ Name: sentencepiece Version: 0.1.92 -Release: 7%{?dist} +Release: 8%{?dist} Summary: An unsupervised text tokenizer for Neural Network-based text generation License: ASL 2.0 @@ -106,6 +106,9 @@ find %{buildroot} -name '*.a' -delete %changelog +* Sat Jul 23 2022 Fedora Release Engineering - 0.1.92-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Mon Jun 13 2022 Python Maint - 0.1.92-7 - Rebuilt for Python 3.11 From 4cc77bb2e186f9d52be2074d88719a3f1fdde5c9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 21 Jan 2023 03:00:17 +0000 Subject: [PATCH 06/26] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- sentencepiece.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sentencepiece.spec b/sentencepiece.spec index 0efb1a0..0b30d1d 100644 --- a/sentencepiece.spec +++ b/sentencepiece.spec @@ -4,7 +4,7 @@ Name: sentencepiece Version: 0.1.92 -Release: 8%{?dist} +Release: 9%{?dist} Summary: An unsupervised text tokenizer for Neural Network-based text generation License: ASL 2.0 @@ -106,6 +106,9 @@ find %{buildroot} -name '*.a' -delete %changelog +* Sat Jan 21 2023 Fedora Release Engineering - 0.1.92-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Sat Jul 23 2022 Fedora Release Engineering - 0.1.92-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 24f6483c4cc592f541ddeafc03da90beab580ede Mon Sep 17 00:00:00 2001 From: Python Maint Date: Tue, 13 Jun 2023 20:52:33 +0200 Subject: [PATCH 07/26] Rebuilt for Python 3.12 --- sentencepiece.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sentencepiece.spec b/sentencepiece.spec index 0b30d1d..56efb49 100644 --- a/sentencepiece.spec +++ b/sentencepiece.spec @@ -4,7 +4,7 @@ Name: sentencepiece Version: 0.1.92 -Release: 9%{?dist} +Release: 10%{?dist} Summary: An unsupervised text tokenizer for Neural Network-based text generation License: ASL 2.0 @@ -106,6 +106,9 @@ find %{buildroot} -name '*.a' -delete %changelog +* Tue Jun 13 2023 Python Maint - 0.1.92-10 +- Rebuilt for Python 3.12 + * Sat Jan 21 2023 Fedora Release Engineering - 0.1.92-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From a3bd3e42b5505840af309b5826bc5b68045d0a9e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jul 2023 01:25:02 +0000 Subject: [PATCH 08/26] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- sentencepiece.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sentencepiece.spec b/sentencepiece.spec index 56efb49..f32110c 100644 --- a/sentencepiece.spec +++ b/sentencepiece.spec @@ -4,7 +4,7 @@ Name: sentencepiece Version: 0.1.92 -Release: 10%{?dist} +Release: 11%{?dist} Summary: An unsupervised text tokenizer for Neural Network-based text generation License: ASL 2.0 @@ -106,6 +106,9 @@ find %{buildroot} -name '*.a' -delete %changelog +* Sat Jul 22 2023 Fedora Release Engineering - 0.1.92-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Tue Jun 13 2023 Python Maint - 0.1.92-10 - Rebuilt for Python 3.12 From aa3a52c643dcb1679c8f2a2907a3540070c09c35 Mon Sep 17 00:00:00 2001 From: topazus Date: Sat, 23 Dec 2023 22:24:05 +0800 Subject: [PATCH 09/26] Convert to %autorelease and %autochangelog [skip changelog] --- changelog | 54 +++++++++++++++++++++++++++++++++++++++++++ sentencepiece.spec | 57 ++-------------------------------------------- 2 files changed, 56 insertions(+), 55 deletions(-) create mode 100644 changelog diff --git a/changelog b/changelog new file mode 100644 index 0000000..6d8510f --- /dev/null +++ b/changelog @@ -0,0 +1,54 @@ +* Sat Jul 22 2023 Fedora Release Engineering - 0.1.92-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Tue Jun 13 2023 Python Maint - 0.1.92-10 +- Rebuilt for Python 3.12 + +* Sat Jan 21 2023 Fedora Release Engineering - 0.1.92-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Sat Jul 23 2022 Fedora Release Engineering - 0.1.92-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 13 2022 Python Maint - 0.1.92-7 +- Rebuilt for Python 3.11 + +* Sat Jan 22 2022 Fedora Release Engineering - 0.1.92-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 0.1.92-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Jun 04 2021 Python Maint - 0.1.92-4 +- Rebuilt for Python 3.10 + +* Wed Jan 27 2021 Fedora Release Engineering - 0.1.92-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Oct 07 2020 Kentaro Hayashi - 0.1.92-2 +- Add missing BuildRequires: python3-setuptools + +* Thu Oct 01 2020 Kentaro Hayashi - 0.1.92-1 +- New upstream release + +* Tue Sep 22 2020 Jeff Law - 0.1.84-6 +- Use cmake_in_source_build to fix FTBFS due to recent cmake macro changes + +* Sat Aug 01 2020 Fedora Release Engineering - 0.1.84-5 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 0.1.84-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue May 26 2020 Miro Hrončok - 0.1.84-3 +- Rebuilt for Python 3.9 + +* Thu Jan 30 2020 Fedora Release Engineering - 0.1.84-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Nov 14 2019 Kentaro Hayashi - 0.1.84-1 +- New upstream release + +* Mon Oct 07 2019 Kentaro Hayashi - 0.1.83-1 +- initial packaging diff --git a/sentencepiece.spec b/sentencepiece.spec index f32110c..0411045 100644 --- a/sentencepiece.spec +++ b/sentencepiece.spec @@ -4,7 +4,7 @@ Name: sentencepiece Version: 0.1.92 -Release: 11%{?dist} +Release: %autorelease Summary: An unsupervised text tokenizer for Neural Network-based text generation License: ASL 2.0 @@ -106,57 +106,4 @@ find %{buildroot} -name '*.a' -delete %changelog -* Sat Jul 22 2023 Fedora Release Engineering - 0.1.92-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Tue Jun 13 2023 Python Maint - 0.1.92-10 -- Rebuilt for Python 3.12 - -* Sat Jan 21 2023 Fedora Release Engineering - 0.1.92-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Sat Jul 23 2022 Fedora Release Engineering - 0.1.92-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Mon Jun 13 2022 Python Maint - 0.1.92-7 -- Rebuilt for Python 3.11 - -* Sat Jan 22 2022 Fedora Release Engineering - 0.1.92-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Fri Jul 23 2021 Fedora Release Engineering - 0.1.92-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Fri Jun 04 2021 Python Maint - 0.1.92-4 -- Rebuilt for Python 3.10 - -* Wed Jan 27 2021 Fedora Release Engineering - 0.1.92-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Wed Oct 07 2020 Kentaro Hayashi - 0.1.92-2 -- Add missing BuildRequires: python3-setuptools - -* Thu Oct 01 2020 Kentaro Hayashi - 0.1.92-1 -- New upstream release - -* Tue Sep 22 2020 Jeff Law - 0.1.84-6 -- Use cmake_in_source_build to fix FTBFS due to recent cmake macro changes - -* Sat Aug 01 2020 Fedora Release Engineering - 0.1.84-5 -- Second attempt - Rebuilt for - https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Wed Jul 29 2020 Fedora Release Engineering - 0.1.84-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Tue May 26 2020 Miro Hrončok - 0.1.84-3 -- Rebuilt for Python 3.9 - -* Thu Jan 30 2020 Fedora Release Engineering - 0.1.84-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Thu Nov 14 2019 Kentaro Hayashi - 0.1.84-1 -- New upstream release - -* Mon Oct 07 2019 Kentaro Hayashi - 0.1.83-1 -- initial packaging +%autochangelog From 229120265ae6b1fe4291fba04339728be6f11a06 Mon Sep 17 00:00:00 2001 From: topazus Date: Sat, 23 Dec 2023 23:29:19 +0800 Subject: [PATCH 10/26] update to 0.1.99 --- .gitignore | 1 + packit.yaml | 26 +++++++++++++++++++++ sentencepiece.spec | 57 ++++++++++++++++++++-------------------------- sources | 2 +- 4 files changed, 53 insertions(+), 33 deletions(-) create mode 100644 packit.yaml diff --git a/.gitignore b/.gitignore index 9eed377..3ede48a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /sentencepiece-0.1.83-Source.tar.xz /sentencepiece-0.1.84-Source.tar.xz /sentencepiece-0.1.92-Source.tar.xz +/sentencepiece-0.1.99.tar.gz diff --git a/packit.yaml b/packit.yaml new file mode 100644 index 0000000..f436bd8 --- /dev/null +++ b/packit.yaml @@ -0,0 +1,26 @@ +upstream_package_name: sentencepiece +upstream_project_url: https://github.com/google/sentencepiece +upstream_tag_template: v{version} + +downstream_package_name: sentencepiece + +specfile_path: sentencepiece.spec + +jobs: + - job: pull_from_upstream + trigger: release + dist_git_branches: + - rawhide + - epel-9 + + - job: koji_build + trigger: commit + dist_git_branches: + - rawhide + - epel-9 + + - job: bodhi_update + trigger: commit + dist_git_branches: + - rawhide + - epel-9 \ No newline at end of file diff --git a/sentencepiece.spec b/sentencepiece.spec index 0411045..8214bbe 100644 --- a/sentencepiece.spec +++ b/sentencepiece.spec @@ -1,23 +1,18 @@ -%define __cmake_in_source_build 1 - -%define _epel %{?epel:%{epel}}%{!?epel:0} - Name: sentencepiece -Version: 0.1.92 +Version: 0.1.99 Release: %autorelease Summary: An unsupervised text tokenizer for Neural Network-based text generation -License: ASL 2.0 +License: Apache-2.0 URL: https://github.com/google/sentencepiece -Source0: https://github.com/google/sentencepiece/releases/download/v%{version}/%{name}-%{version}-Source.tar.xz +Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz + +# https://github.com/google/sentencepiece/issues/860 +ExcludeArch: s390x -BuildRequires: make -%if 0%{_epel} >= 7 -BuildRequires: cmake3 -%else -BuildRequires: cmake -%endif BuildRequires: gcc-c++ +BuildRequires: cmake +BuildRequires: ninja-build BuildRequires: gperftools-devel BuildRequires: pkgconfig BuildRequires: python3-devel @@ -26,10 +21,10 @@ BuildRequires: python3-setuptools %description The SentencePiece is an unsupervised text tokenizer for Neural Network-based text generation. -It is an unsupervised text tokenizer and detokenizer mainly for -Neural Network-based text generation systems where the vocabulary size is +It is an unsupervised text tokenizer and detokenizer mainly for +Neural Network-based text generation systems where the vocabulary size is predetermined prior to the neural model training. -SentencePiece implements subword units and unigram language model with the +SentencePiece implements subword units and unigram language model with the extension of direct training from raw sentences. SentencePiece allows us to make a purely end-to-end system that does not depend on language-specific pre/post-processing. @@ -63,27 +58,27 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release} This package contains Python3 module file for SentencePiece. %prep -%autosetup -n %{name}-%{version}-Source +%autosetup %build -%if %{_epel} >= 7 -cmake3 . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_INSTALL_LIBDIR=%{_libdir} -%else -%cmake . -DCMAKE_INSTALL_LIBDIR=%{_libdir} -%endif -%make_build +%cmake \ + -GNinja \ + -DCMAKE_BUILD_TYPE=Release \ + +%cmake_build + pushd python -CFLAGS="-I../src" LDFLAGS="-L../src -lsentencepiece" PKG_CONFIG_PATH=".." %{__python3} setup.py build +CFLAGS="-I../src" LDFLAGS="-L../%{_vpath_builddir}/src -lsentencepiece" PKG_CONFIG_PATH="../%{_vpath_builddir}" %py3_build popd %install -%make_install +%cmake_install + pushd python -PKG_CONFIG_PATH=".." %py3_install +%py3_install popd -sed -i'' -e "s,%{buildroot},," %{buildroot}%{_libdir}/pkgconfig/sentencepiece.pc -sed -i'' -e "s,${prefix}/lib,%{_libdir}," %{buildroot}%{_libdir}/pkgconfig/sentencepiece.pc -find %{buildroot} -name '*.a' -delete + +rm %{buildroot}%{_libdir}/libsentencepiece*.a %files libs %doc README.md @@ -99,9 +94,7 @@ find %{buildroot} -name '*.a' -delete %{_bindir}/spm* %files -n python3-%{name} -%{python3_sitearch}/%{name}.py -%{python3_sitearch}/_%{name}*.so -%{python3_sitearch}/__pycache__/* +%{python3_sitearch}/%{name}/ %{python3_sitearch}/%{name}-*.egg-info/ diff --git a/sources b/sources index c96818f..05e1abe 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (sentencepiece-0.1.92-Source.tar.xz) = 9f9fc6ec9bec4c43f5051903d1461c45fa199f8c331d789d8e6ee9eb315e0c5fdbbd6a9adb76db6cf4ef683e73ffc1691dd530568b920d90b24dcce31291b062 +SHA512 (sentencepiece-0.1.99.tar.gz) = 31dc4dc3f2ff4a7effc1ed2d6ad219bcd5d28c0bac89fdeae0336f23e93f954c597313788529e692a0d694d5fa7c3c285a485dfb84a96921efc4b49bcd465358 From 912deb329cbf1331affad0fe958f8d1550bbc5eb Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 27 Jan 2024 02:35:00 +0000 Subject: [PATCH 11/26] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From dff559dca0d5c898cc0e01b572792aa44637e67c Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 7 Jun 2024 10:32:53 +0200 Subject: [PATCH 12/26] Rebuilt for Python 3.13 From 611d0066067835ad84ab964cc0cd947a493b911d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jul 2024 05:15:21 +0000 Subject: [PATCH 13/26] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 9456ec7a89c54a04e35689ae7d75bb046d311b86 Mon Sep 17 00:00:00 2001 From: Tom Rix Date: Thu, 2 Jan 2025 08:24:37 -0800 Subject: [PATCH 14/26] Update to 0.2.0 Signed-off-by: Tom Rix --- .gitignore | 1 + sentencepiece.spec | 10 ++++++++-- sources | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 3ede48a..b36ef6b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /sentencepiece-0.1.84-Source.tar.xz /sentencepiece-0.1.92-Source.tar.xz /sentencepiece-0.1.99.tar.gz +/sentencepiece-0.2.0.tar.gz diff --git a/sentencepiece.spec b/sentencepiece.spec index 8214bbe..feebfe4 100644 --- a/sentencepiece.spec +++ b/sentencepiece.spec @@ -1,5 +1,5 @@ Name: sentencepiece -Version: 0.1.99 +Version: 0.2.0 Release: %autorelease Summary: An unsupervised text tokenizer for Neural Network-based text generation @@ -15,6 +15,7 @@ BuildRequires: cmake BuildRequires: ninja-build BuildRequires: gperftools-devel BuildRequires: pkgconfig +BuildRequires: protobuf-lite-devel BuildRequires: python3-devel BuildRequires: python3-setuptools @@ -52,6 +53,7 @@ This package contains header files to develop a software using SentencePiece. %package -n python3-%{name} Summary: Python module for SentencePiece Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: python3dist(protobuf) %{?python_provide:%python_provide python3-%{name}} %description -n python3-%{name} @@ -60,6 +62,9 @@ This package contains Python3 module file for SentencePiece. %prep %autosetup +# Need some help finding the src dir now +sed -i -e "s@'std=c++17',@'std=c++17','-I../src',@" python/setup.py + %build %cmake \ -GNinja \ @@ -68,7 +73,8 @@ This package contains Python3 module file for SentencePiece. %cmake_build pushd python -CFLAGS="-I../src" LDFLAGS="-L../%{_vpath_builddir}/src -lsentencepiece" PKG_CONFIG_PATH="../%{_vpath_builddir}" %py3_build +%py3_build + popd %install diff --git a/sources b/sources index 05e1abe..b43c0d7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (sentencepiece-0.1.99.tar.gz) = 31dc4dc3f2ff4a7effc1ed2d6ad219bcd5d28c0bac89fdeae0336f23e93f954c597313788529e692a0d694d5fa7c3c285a485dfb84a96921efc4b49bcd465358 +SHA512 (sentencepiece-0.2.0.tar.gz) = b4214f5bfbe2a0757794c792e87e7c53fda7e65b2511b37fc757f280bf9287ba59b5d630801e17de6058f8292a3c6433211917324cb3446a212a51735402e614 From e0b8e6d973444f5b0e90715ce033f91b18202465 Mon Sep 17 00:00:00 2001 From: Tom Rix Date: Sat, 18 Jan 2025 04:35:06 -0800 Subject: [PATCH 15/26] gcc 15 include cstdint Signed-off-by: Tom Rix --- sentencepiece.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sentencepiece.spec b/sentencepiece.spec index feebfe4..c2909a7 100644 --- a/sentencepiece.spec +++ b/sentencepiece.spec @@ -65,6 +65,9 @@ This package contains Python3 module file for SentencePiece. # Need some help finding the src dir now sed -i -e "s@'std=c++17',@'std=c++17','-I../src',@" python/setup.py +# gcc 15 include cstdint +sed -i '/#include .*/a#include ' src/sentencepiece_processor.h + %build %cmake \ -GNinja \ From b8104b1561834350ca424ebb73ff990fa8b1bbdc Mon Sep 17 00:00:00 2001 From: Tom Rix Date: Sat, 1 Mar 2025 07:55:04 -0800 Subject: [PATCH 16/26] Cmake version changed Signed-off-by: Tom Rix --- sentencepiece.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sentencepiece.spec b/sentencepiece.spec index c2909a7..ed6a67c 100644 --- a/sentencepiece.spec +++ b/sentencepiece.spec @@ -68,6 +68,9 @@ sed -i -e "s@'std=c++17',@'std=c++17','-I../src',@" python/setup.py # gcc 15 include cstdint sed -i '/#include .*/a#include ' src/sentencepiece_processor.h +# cmake version +sed -i -e 's@cmake_minimum_required(VERSION 3.1 FATAL_ERROR)@cmake_minimum_required(VERSION 3.5 FATAL_ERROR)@' CMakeLists.txt + %build %cmake \ -GNinja \ From 1a390692e9160e5e151c20cbcd02b23d54deee1b Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 2 Jun 2025 22:54:08 +0200 Subject: [PATCH 17/26] Rebuilt for Python 3.14 From 81d9066f41c77f73fadd8ba4ac20809074035cd0 Mon Sep 17 00:00:00 2001 From: Tom Rix Date: Tue, 15 Jul 2025 05:14:52 -0700 Subject: [PATCH 18/26] Use pyproject macros Signed-off-by: Tom Rix --- sentencepiece.spec | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sentencepiece.spec b/sentencepiece.spec index ed6a67c..85fde82 100644 --- a/sentencepiece.spec +++ b/sentencepiece.spec @@ -18,6 +18,7 @@ BuildRequires: pkgconfig BuildRequires: protobuf-lite-devel BuildRequires: python3-devel BuildRequires: python3-setuptools +BuildRequires: python3dist(pip) %description The SentencePiece is an unsupervised text tokenizer for Neural Network-based @@ -79,7 +80,7 @@ sed -i -e 's@cmake_minimum_required(VERSION 3.1 FATAL_ERROR)@cmake_minimum_requi %cmake_build pushd python -%py3_build +%pyproject_wheel popd @@ -87,7 +88,9 @@ popd %cmake_install pushd python -%py3_install +%pyproject_install +%pyproject_save_files sentencepiece + popd rm %{buildroot}%{_libdir}/libsentencepiece*.a @@ -105,10 +108,7 @@ rm %{buildroot}%{_libdir}/libsentencepiece*.a %files tools %{_bindir}/spm* -%files -n python3-%{name} -%{python3_sitearch}/%{name}/ -%{python3_sitearch}/%{name}-*.egg-info/ - +%files -n python3-%{name} -f %{pyproject_files} %changelog %autochangelog From 50d78919b3c1aa477cb2468cf4aeb9f94232b5a3 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 18:09:06 +0000 Subject: [PATCH 19/26] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From aaeebb1abbce906661c2423b4f0e25b244d74646 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 15 Aug 2025 15:17:21 +0200 Subject: [PATCH 20/26] Rebuilt for Python 3.14.0rc2 bytecode From 82dfde38955e9d1dd1bc3ebbddf3fafde9104b36 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 19 Sep 2025 14:55:45 +0200 Subject: [PATCH 21/26] Rebuilt for Python 3.14.0rc3 bytecode From 5bbfd2962fe5783518c12407e2c9428dd522cb53 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 17 Jan 2026 17:53:43 +0000 Subject: [PATCH 22/26] Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild From 752bec4ca199809293b44f1f63045353185bf77c Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Tue, 19 May 2026 22:07:41 +0100 Subject: [PATCH 23/26] Update to 0.2.1 - Fixes CVE-2026-1260 (rhbz#2432139 rhbz#2432139) - Minor package updates for new rev --- .gitignore | 1 + sentencepiece.spec | 14 +++++--------- sources | 2 +- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index b36ef6b..0d76080 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /sentencepiece-0.1.92-Source.tar.xz /sentencepiece-0.1.99.tar.gz /sentencepiece-0.2.0.tar.gz +/sentencepiece-0.2.1.tar.gz diff --git a/sentencepiece.spec b/sentencepiece.spec index 85fde82..7d68fd7 100644 --- a/sentencepiece.spec +++ b/sentencepiece.spec @@ -1,5 +1,5 @@ Name: sentencepiece -Version: 0.2.0 +Version: 0.2.1 Release: %autorelease Summary: An unsupervised text tokenizer for Neural Network-based text generation @@ -66,16 +66,12 @@ This package contains Python3 module file for SentencePiece. # Need some help finding the src dir now sed -i -e "s@'std=c++17',@'std=c++17','-I../src',@" python/setup.py -# gcc 15 include cstdint -sed -i '/#include .*/a#include ' src/sentencepiece_processor.h - -# cmake version -sed -i -e 's@cmake_minimum_required(VERSION 3.1 FATAL_ERROR)@cmake_minimum_required(VERSION 3.5 FATAL_ERROR)@' CMakeLists.txt - %build %cmake \ -GNinja \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_LIBDIR=%{_libdir} \ + %{nil} %cmake_build @@ -93,7 +89,7 @@ pushd python popd -rm %{buildroot}%{_libdir}/libsentencepiece*.a +find %{buildroot} -name '*.a' -delete %files libs %doc README.md @@ -102,7 +98,7 @@ rm %{buildroot}%{_libdir}/libsentencepiece*.a %files devel %{_includedir}/sentencepiece*.h -%{_libdir}/*.so +%{_libdir}/libsentencepiece*.so %{_libdir}/pkgconfig/sentencepiece*.pc %files tools diff --git a/sources b/sources index b43c0d7..59db35d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (sentencepiece-0.2.0.tar.gz) = b4214f5bfbe2a0757794c792e87e7c53fda7e65b2511b37fc757f280bf9287ba59b5d630801e17de6058f8292a3c6433211917324cb3446a212a51735402e614 +SHA512 (sentencepiece-0.2.1.tar.gz) = 012850b63b2323e16acc5dacc0a494ad3f6375425ee86274f0946032e47c088a3b307758b99d752fcf54acf76c82d7d13d0c14bbf07aa9b612c4f1fbd30cf1cf From ec017dfedb40b9abd9af5d6ab68e517cc60bb317 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Wed, 3 Jun 2026 21:19:22 +0200 Subject: [PATCH 24/26] Rebuilt for Python 3.15 From 4036edcecc9ebe80ed188e1f06ea8f1a9d118097 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jul 2026 06:24:08 +0000 Subject: [PATCH 25/26] Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild From f94139457a6aa335e736f69bf6a3099603260579 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Wed, 22 Jul 2026 10:51:18 +0200 Subject: [PATCH 26/26] Rebuilt for Python 3.15.0b4 ABI change