Skip to contentSkip to conversation

master - spec: Update python bindings and dbus-service

PATCH Marian Csontos 1 participant 1 message Feb 18, 2016

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=04ab1fa572bbc6751463b137576bc733ec27b2ca
Commit:        04ab1fa572bbc6751463b137576bc733ec27b2ca
Parent:        a89ddda1a292402a2cf2422d09e58dba46079163
Author:        Marian Csontos <[email protected]>
AuthorDate:    Thu Feb 18 14:34:17 2016 +0100
Committer:     Marian Csontos <[email protected]>
CommitterDate: Thu Feb 18 20:46:03 2016 +0100

spec: Update python bindings and dbus-service

The workaround for python3 is no longer needed.

---
 spec/build.inc    |   12 ++----------
 spec/packages.inc |   44 +++++++++++++++++++++++++++++++++++++++++++-
 spec/source.inc   |   17 +++++++++++++++++
 3 files changed, 62 insertions(+), 11 deletions(-)
spec/build.inc +2 -10
index 2bb285d..3ba7840 100644
@@ -31,20 +31,12 @@
 %enableif %{enable_lockd_sanlock} lockd-sanlock
 %endif
 %enableif %{enable_python} python2-bindings
+%enableif %{enable_python3} python3-bindings
 %enableif %{enable_python} applib
+%enableif %{enable_dbusd} dbus-service
 
 %build
 
-%if %{enable_python3}
-rm -rf %{py3dir}
-cp -a . %{py3dir}
-pushd %{py3dir}
-%configure %{configure_flags} --disable-python2-bindings --enable-python3-bindings PYTHON=/usr/bin/python3 PYTHON_CONFIG=/usr/bin/python3-config
-
-make %{?_smp_mflags}
-popd
-%endif
-
 %configure %{configure_flags}
 
 make %{?_smp_mflags}
spec/packages.inc +43 -1

50 lines not on this page · raw message

spec/source.inc +17 -0
index 07859ba..97f29f1 100644
@@ -8,6 +8,7 @@
 %global enable_python 1
 # Off by default - <= does not work well with or:
 %global enable_python3 0
+%global enable_dbusd 0
 %global enable_udev 1
 %global enable_systemd 1
 %global enable_cmirror 1
@@ -87,6 +88,22 @@
 
 ##############################################################
 
+%if %{rhel} >= 8 || %{fedora} >= 23
+  %if %{enable_python3}
+    %global enable_dbusd 1
+  %else
+    # dbusd requires python3
+    false
+  %endif
+%endif
+
+%if %{enable_dbusd}
+  %global buildreq_python3_dbus python3-dbus
+  %global buildreq_python3_pyudev python3-pyudev
+%endif
+
+##############################################################
+
 %if %{fedora} == 16 || %{rhel} == 6
 %global enable_systemd 0