From d257a2ceab3d6ce40e8d7cfe6869f63b629899b2 Mon Sep 17 00:00:00 2001 From: hubin Date: Tue, 22 Nov 2022 11:39:38 +0800 Subject: [PATCH] add python subpackage for tensorflow 2.10 build Signed-off-by: hubin --- flatbuffers.spec | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/flatbuffers.spec b/flatbuffers.spec index 6f70b84..2ffc6eb 100644 --- a/flatbuffers.spec +++ b/flatbuffers.spec @@ -5,7 +5,7 @@ %endif Name: flatbuffers Version: 2.0.0 -Release: 1 +Release: 2 Summary: Memory efficient serialization library License: Apache-2.0 URL: https://github.com/google/flatbuffers @@ -27,9 +27,16 @@ Requires: %{name}%{?_isa} = %{version}-%{release} %description devel %{summary}. +%package -n python3-flatbuffers +Summary: The FlatBuffers serialization format for Python +BuildRequires: python3-devel +BuildRequires: python3-setuptools +%description -n python3-flatbuffers +Python runtime library for use with the Flatbuffers serialization format. + %prep %autosetup -p1 -rm -rf js net php python docs go java js biicode {samples/,}android +rm -rf js net php docs go java js biicode {samples/,}android chmod -x readme.md %cmake -DCMAKE_BUILD_TYPE=Release \ -DFLATBUFFERS_BUILD_SHAREDLIB=ON \ @@ -40,12 +47,20 @@ chmod -x readme.md %build %make_build +pushd python +%py3_build +popd + %install %make_install mkdir -p %{buildroot}%{_mandir}/man{1,7} cp -p %SOURCE1 %{buildroot}%{_mandir}/man1/flatc.1 cp -p %SOURCE2 %{buildroot}%{_mandir}/man7/flatbuffers.7 +pushd python +%py3_install +popd + %check %if %{with tests} make test @@ -69,7 +84,13 @@ make test %{_libdir}/pkgconfig/flatbuffers.pc %{_libdir}/cmake/flatbuffers/*.cmake +%files -n python3-flatbuffers +%{python3_sitelib}/ + %changelog +* Tue Nov 22 2022 Bin Hu - 2.0.0-2 +- add python subpackage for tensorflow 2.10 build + * Tue Aug 17 2021 yaoxin - 2.0.0-1 - Upgrade 2.0.0 to fix CVE-2020-35864 -- Gitee