[packages/flatbuffers] - added python3-flatbuffers subpackage; rel 2
arekm
arekm at pld-linux.org
Sun Sep 20 21:34:35 CEST 2026
commit 5864aa74f57675d8e21bebb9dca1926fb1692308
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sun Sep 20 21:34:11 2026 +0200
- added python3-flatbuffers subpackage; rel 2
flatbuffers.spec | 45 ++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 42 insertions(+), 3 deletions(-)
---
diff --git a/flatbuffers.spec b/flatbuffers.spec
index 1aaffa8..cbca908 100644
--- a/flatbuffers.spec
+++ b/flatbuffers.spec
@@ -8,15 +8,18 @@
# C#
# nim >= 1.4.0
# PHP
-# Python (2, 3)
# Rust
# Swift
# JavaScript/TypeScript
+#
+# Conditional build:
+%bcond_without python3 # Python 3 runtime module
+
Summary: Memory efficient serialization library
Summary(pl.UTF-8): Wydajna pamięciowo biblioteka do serializacji
Name: flatbuffers
Version: 25.2.10
-Release: 1
+Release: 2
License: Apache v2.0
Group: Libraries
#Source0Download: https://github.com/google/flatbuffers/releases
@@ -25,7 +28,12 @@ Source0: https://github.com/google/flatbuffers/archive/v%{version}/%{name}-%{ver
URL: https://google.github.io/flatbuffers/
BuildRequires: cmake >= 3.8
BuildRequires: libstdc++-devel >= 6:4.7
-BuildRequires: rpmbuild(macros) >= 1.605
+%if %{with python3}
+BuildRequires: python3-modules >= 1:3.6
+BuildRequires: python3-setuptools
+BuildRequires: rpm-pythonprov
+%endif
+BuildRequires: rpmbuild(macros) >= 1.714
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -51,6 +59,19 @@ Header files for FlatBuffers library.
%description devel -l pl.UTF-8
Pliki nagłówkowe biblioteki FlatBuffers.
+%package -n python3-flatbuffers
+Summary: FlatBuffers runtime library for Python 3
+Summary(pl.UTF-8): Biblioteka uruchomieniowa FlatBuffers dla Pythona 3
+Group: Libraries/Python
+Requires: python3-modules >= 1:3.6
+BuildArch: noarch
+
+%description -n python3-flatbuffers
+FlatBuffers runtime library for Python 3.
+
+%description -n python3-flatbuffers -l pl.UTF-8
+Biblioteka uruchomieniowa FlatBuffers dla Pythona 3.
+
%prep
%setup -q
@@ -65,6 +86,11 @@ cd build
%{__make}
+%if %{with python3}
+cd ../python
+%py3_build
+%endif
+
%install
rm -rf $RPM_BUILD_ROOT
@@ -75,6 +101,11 @@ rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_bindir}
install -p build/flathash $RPM_BUILD_ROOT%{_bindir}
+%if %{with python3}
+cd python
+%py3_install
+%endif
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -93,3 +124,11 @@ rm -rf $RPM_BUILD_ROOT
%{_includedir}/flatbuffers
%{_libdir}/cmake/flatbuffers
%{_pkgconfigdir}/flatbuffers.pc
+
+%if %{with python3}
+%files -n python3-flatbuffers
+%defattr(644,root,root,755)
+%doc LICENSE
+%{py3_sitescriptdir}/flatbuffers
+%{py3_sitescriptdir}/flatbuffers-%{version}-py*.egg-info
+%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/flatbuffers.git/commitdiff/5864aa74f57675d8e21bebb9dca1926fb1692308
More information about the pld-cvs-commit
mailing list