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