[libvirt] [PATCH python 2/7] Allow override of which sub-RPMs to build

Daniel P. Berrange berrange at redhat.com
Thu Jan 11 16:43:34 UTC 2018


Allow using

  rpmbuild --define "with_python2 0"

to override the default logic about which python sub-RPMs to build

Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
---
 libvirt-python.spec.in | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/libvirt-python.spec.in b/libvirt-python.spec.in
index 5bbebeb..1619e26 100644
--- a/libvirt-python.spec.in
+++ b/libvirt-python.spec.in
@@ -1,10 +1,13 @@
 
-%define with_python2 1
-%define with_python3 0
+%define _with_python2 1
+%define _with_python3 0
 %if 0%{?fedora}
-%define with_python3 1
+%define _with_python3 1
 %endif
 
+%{!?with_python2: %define with_python2 %{_with_python2}}
+%{!?with_python3: %define with_python3 %{_with_python3}}
+
 Summary: The libvirt virtualization API python2 binding
 Name: libvirt-python
 Version: @PY_VERSION@
-- 
2.14.3




More information about the libvir-list mailing list