[PATCH python v2 2/9] Allow override of which sub-RPMs to build

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Allow using

  rpmbuild --define "with_python2 0"

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

Reviewed-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
---
 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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux