From 8d6a8aec0a9a5ffd2a5e8e41b52795355d79d17f74db6071dd082ce439cc619f Mon Sep 17 00:00:00 2001 From: David Sterba Date: Wed, 16 Oct 2019 15:20:08 +0000 Subject: [PATCH] Accepting request 738633 from home:morbidrsa - Enable build of python-bindings for libbtrfsutil OBS-URL: https://build.opensuse.org/request/show/738633 OBS-URL: https://build.opensuse.org/package/show/filesystems/btrfsprogs?expand=0&rev=323 --- btrfsprogs.changes | 5 +++++ btrfsprogs.spec | 22 ++++++++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/btrfsprogs.changes b/btrfsprogs.changes index 0856032..3561b97 100644 --- a/btrfsprogs.changes +++ b/btrfsprogs.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Oct 15 14:22:21 UTC 2019 - Johannes Thumshirn + +- Enable build of python-bindings for libbtrfsutil + ------------------------------------------------------------------- Tue Sep 17 10:01:18 UTC 2019 - Frederic Crozat diff --git a/btrfsprogs.spec b/btrfsprogs.spec index a4408ba..c76f2ed 100644 --- a/btrfsprogs.spec +++ b/btrfsprogs.spec @@ -19,6 +19,7 @@ %define udev_with_btrfs_builtin 190 %define udev_version %(rpm -q --queryformat %%{VERSION} udev) %define package_udev_rules %{udev_version} >= %{udev_with_btrfs_builtin} +%{?!python_module:%define python_module() python-%{**} python3-%{**}} # enable building of btrfsprogs-static %if 0%{?suse_version} <= 1310 || 0%{?suse_version} == 1315 @@ -173,6 +174,19 @@ Requires: libbtrfsutil1 = %{version} This package contains the libraries and headers files for developers to build applications to interface with Btrfs using libbtrfsutil. +%package -n python-btrfsutil +Summary: Python bindings for developing with libbtrfsutil +Group: Development/Languages/Python +Requires: %{name} = %{version}-%{release} +Requires: libbtrfsutil1 = %{version} +Requires: python3 +BuildRequires: %{python_module setuptools} +BuildRequires: pkgconfig(python3) + +%description -n python-btrfsutil +This package contains the python bindings to build applications to interface +with Btrfs using libbtrfsutil. + %prep %setup -q -n btrfs-progs-v%{version} %patch1 -p1 @@ -185,7 +199,7 @@ export CFLAGS="%{optflags} -include sles11-defaults.h" %endif %configure \ - --disable-python \ + --enable-python \ %if !%{build_docs} --disable-documentation \ %endif @@ -203,7 +217,8 @@ make install \ %if %{build_static} install-static \ %endif - DESTDIR=%{buildroot} prefix=%{_prefix} bindir=%{_sbindir} mandir=%{_mandir} libdir=%{_libdir} + DESTDIR=%{buildroot} prefix=%{_prefix} bindir=%{_sbindir} mandir=%{_mandir} libdir=%{_libdir} \ + install_python %if !%{build_docs} cd Documentation @@ -398,4 +413,7 @@ done %{_udevrulesdir}/64-btrfs-dm.rules %endif +%files -n python-btrfsutil +%{python3_sitearch}/* + %changelog