Compare commits

..

No commits in common. "rawhide" and "f38" have entirely different histories.

3 changed files with 10 additions and 20 deletions

2
.gitignore vendored
View file

@ -2,5 +2,3 @@
/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
/sentencepiece-0.2.1.tar.gz

View file

@ -1,5 +1,5 @@
Name: sentencepiece
Version: 0.2.1
Version: 0.1.99
Release: %autorelease
Summary: An unsupervised text tokenizer for Neural Network-based text generation
@ -15,10 +15,8 @@ BuildRequires: cmake
BuildRequires: ninja-build
BuildRequires: gperftools-devel
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
@ -54,7 +52,6 @@ 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}
@ -63,33 +60,25 @@ 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 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_LIBDIR=%{_libdir} \
%{nil}
%cmake_build
pushd python
%pyproject_wheel
CFLAGS="-I../src" LDFLAGS="-L../%{_vpath_builddir}/src -lsentencepiece" PKG_CONFIG_PATH="../%{_vpath_builddir}" %py3_build
popd
%install
%cmake_install
pushd python
%pyproject_install
%pyproject_save_files sentencepiece
%py3_install
popd
find %{buildroot} -name '*.a' -delete
rm %{buildroot}%{_libdir}/libsentencepiece*.a
%files libs
%doc README.md
@ -98,13 +87,16 @@ find %{buildroot} -name '*.a' -delete
%files devel
%{_includedir}/sentencepiece*.h
%{_libdir}/libsentencepiece*.so
%{_libdir}/*.so
%{_libdir}/pkgconfig/sentencepiece*.pc
%files tools
%{_bindir}/spm*
%files -n python3-%{name} -f %{pyproject_files}
%files -n python3-%{name}
%{python3_sitearch}/%{name}/
%{python3_sitearch}/%{name}-*.egg-info/
%changelog
%autochangelog

View file

@ -1 +1 @@
SHA512 (sentencepiece-0.2.1.tar.gz) = 012850b63b2323e16acc5dacc0a494ad3f6375425ee86274f0946032e47c088a3b307758b99d752fcf54acf76c82d7d13d0c14bbf07aa9b612c4f1fbd30cf1cf
SHA512 (sentencepiece-0.1.99.tar.gz) = 31dc4dc3f2ff4a7effc1ed2d6ad219bcd5d28c0bac89fdeae0336f23e93f954c597313788529e692a0d694d5fa7c3c285a485dfb84a96921efc4b49bcd465358