diff mbox series

[ovs-dev] rhel: Remove the cond 'build_python3'

Message ID 20191021094242.25134-1-numans@ovn.org
State Accepted
Headers show
Series [ovs-dev] rhel: Remove the cond 'build_python3' | expand

Commit Message

Numan Siddique Oct. 21, 2019, 9:42 a.m. UTC
From: Numan Siddique <numans@ovn.org>

A previous patch removed python2 support from ovs. So we can remove
this condition and make python3 mandatory for builds. Without this
patch, make rpm-fedora on centos 7 fails unless  we pass
RPMBUILD_OPT="--with build_python3".

Signed-off-by: Numan Siddique <numans@ovn.org>
---
 rhel/openvswitch-fedora.spec.in | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

Comments

Ben Pfaff Oct. 21, 2019, 4:05 p.m. UTC | #1
On Mon, Oct 21, 2019 at 03:12:42PM +0530, numans@ovn.org wrote:
> From: Numan Siddique <numans@ovn.org>
> 
> A previous patch removed python2 support from ovs. So we can remove
> this condition and make python3 mandatory for builds. Without this
> patch, make rpm-fedora on centos 7 fails unless  we pass
> RPMBUILD_OPT="--with build_python3".
> 
> Signed-off-by: Numan Siddique <numans@ovn.org>

Thanks.  I read this and applied this to master.  I did not actually
test it.
Numan Siddique Oct. 22, 2019, 6:26 a.m. UTC | #2
On Mon, Oct 21, 2019 at 10:51 PM Ben Pfaff <blp@ovn.org> wrote:

> On Mon, Oct 21, 2019 at 03:12:42PM +0530, numans@ovn.org wrote:
> > From: Numan Siddique <numans@ovn.org>
> >
> > A previous patch removed python2 support from ovs. So we can remove
> > this condition and make python3 mandatory for builds. Without this
> > patch, make rpm-fedora on centos 7 fails unless  we pass
> > RPMBUILD_OPT="--with build_python3".
> >
> > Signed-off-by: Numan Siddique <numans@ovn.org>
>
> Thanks.  I read this and applied this to master.  I did not actually
> test it.
>

Thanks for applying the patch.

Numan
diff mbox series

Patch

diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in
index 80010a41b..3a87c6d0c 100644
--- a/rhel/openvswitch-fedora.spec.in
+++ b/rhel/openvswitch-fedora.spec.in
@@ -28,10 +28,7 @@ 
 %bcond_without libcapng
 # To enable DPDK support, specify '--with dpdk' when building
 %bcond_with dpdk
-# Enable Python 3 by specifying '--with build_python3'.
-# This is enabled by default for versions of the distribution that
-# have Python 3 by default (Fedora > 22).
-%bcond_with build_python3
+
 # If there is a need to automatically enable the package after installation,
 # specify the "--with autoenable"
 %bcond_with autoenable
@@ -61,9 +58,7 @@  Source: http://openvswitch.org/releases/%{name}-%{version}.tar.gz
 BuildRequires: gcc gcc-c++
 BuildRequires: autoconf automake libtool
 BuildRequires: systemd-units openssl openssl-devel
-%if 0%{?fedora} > 22 || %{with build_python3}
 BuildRequires: python3-devel
-%endif
 BuildRequires: desktop-file-utils
 BuildRequires: groff graphviz
 BuildRequires: checkpolicy, selinux-policy-devel
@@ -109,7 +104,6 @@  Requires: selinux-policy-targeted
 %description selinux-policy
 Tailored Open vSwitch SELinux policy
 
-%if 0%{?fedora} > 22 || %{with build_python3}
 %package -n python3-openvswitch
 Summary: Open vSwitch python3 bindings
 License: ASL 2.0
@@ -120,7 +114,6 @@  Requires: python3-six
 
 %description -n python3-openvswitch
 Python bindings for the Open vSwitch database
-%endif
 
 %package test
 Summary: Open vSwitch testing utilities
@@ -244,11 +237,9 @@  install -p -m 0755 rhel/etc_sysconfig_network-scripts_ifdown-ovs \
 install -p -m 0755 rhel/etc_sysconfig_network-scripts_ifup-ovs \
         $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/network-scripts/ifup-ovs
 
-%if 0%{?fedora} > 22 || %{with build_python3}
 install -d -m 0755 $RPM_BUILD_ROOT%{python3_sitelib}
 cp -a $RPM_BUILD_ROOT/%{_datadir}/openvswitch/python/* \
    $RPM_BUILD_ROOT%{python3_sitelib}
-%endif
 
 rm -rf $RPM_BUILD_ROOT/%{_datadir}/openvswitch/python/
 
@@ -388,10 +379,8 @@  fi
 %defattr(-,root,root)
 %{_datadir}/selinux/packages/%{name}/openvswitch-custom.pp
 
-%if 0%{?fedora} > 22 || %{with build_python3}
 %files -n python3-openvswitch
 %{python3_sitelib}/ovs
-%endif
 
 %files test
 %{_bindir}/ovs-test