[ovs-dev,ovn] Require Python 3 and remove support for Python 2.
diff mbox series

Message ID 20191112163131.689521-1-numans@ovn.org
State Superseded
Headers show
Series
  • [ovs-dev,ovn] Require Python 3 and remove support for Python 2.
Related show

Commit Message

Numan Siddique Nov. 12, 2019, 4:31 p.m. UTC
From: Numan Siddique <numans@ovn.org>

OVS removed the support for Python 2 in the commit [1].
And its time we do the same for OVN.

This patch takes care of removing Python 2 references.

[1] - 1ca0323e7c29("Require Python 3 and remove support for Python 2.")

Signed-off-by: Numan Siddique <numans@ovn.org>
---
 Makefile.am                             | 12 ++--
 automake.mk                             |  8 +--
 build-aux/dpdkstrip.py                  |  2 +-
 build-aux/sodepends.py                  |  2 +-
 build-aux/soexpand.py                   |  2 +-
 configure.ac                            |  2 -
 ipsec/ovs-monitor-ipsec.in              |  2 +-
 m4/ovn.m4                               | 89 ++-----------------------
 rhel/ovn-fedora.spec.in                 | 35 +---------
 tests/atlocal.in                        | 16 +----
 tests/checkpatch.at                     |  2 -
 tests/ovn-controller-vtep.at            |  1 -
 tests/ovn-northd.at                     | 10 ---
 tests/ovn.at                            | 62 -----------------
 tests/ovsdb-macros.at                   |  4 --
 tests/system-kmod-macros.at             |  1 -
 tests/system-userspace-macros.at        |  1 -
 utilities/bugtool/automake.mk           |  2 -
 utilities/ovn-detrace.in                |  2 +-
 utilities/ovn-docker-overlay-driver.in  |  2 +-
 utilities/ovn-docker-underlay-driver.in |  2 +-
 21 files changed, 28 insertions(+), 231 deletions(-)

Comments

Mark Michelson Nov. 12, 2019, 5:19 p.m. UTC | #1
Hi Numan,

A couple of things:

1) It appears that configure will now fail if python3 is not found. Does 
this mean python is no longer optional when building? If so, I think 
that needs to be reflected in the commit message. Also, if it's 
required, then I don't see the point of having the HAVE_PYTHON3 variable.

2) I think ovn-detrace requires some further changes. For instance, it 
uses the non-function version of "print". Dumitru is working on a change 
to ovn-detrace [1] that, as a side effect, is switching to using the 
print function instead. It's possible that if we get his change in 
first, then all you would need to do is to remove his "from future 
import print_function" line and things would just work.

I'm not sure if there are other python2-isms present in ovn-detrace or 
other python utilities.

On 11/12/19 11:31 AM, numans@ovn.org wrote:
> From: Numan Siddique <numans@ovn.org>
> 
> OVS removed the support for Python 2 in the commit [1].
> And its time we do the same for OVN.
> 
> This patch takes care of removing Python 2 references.
> 
> [1] - 1ca0323e7c29("Require Python 3 and remove support for Python 2.")
> 
> Signed-off-by: Numan Siddique <numans@ovn.org>
> ---
>   Makefile.am                             | 12 ++--
>   automake.mk                             |  8 +--
>   build-aux/dpdkstrip.py                  |  2 +-
>   build-aux/sodepends.py                  |  2 +-
>   build-aux/soexpand.py                   |  2 +-
>   configure.ac                            |  2 -
>   ipsec/ovs-monitor-ipsec.in              |  2 +-
>   m4/ovn.m4                               | 89 ++-----------------------
>   rhel/ovn-fedora.spec.in                 | 35 +---------
>   tests/atlocal.in                        | 16 +----
>   tests/checkpatch.at                     |  2 -
>   tests/ovn-controller-vtep.at            |  1 -
>   tests/ovn-northd.at                     | 10 ---
>   tests/ovn.at                            | 62 -----------------
>   tests/ovsdb-macros.at                   |  4 --
>   tests/system-kmod-macros.at             |  1 -
>   tests/system-userspace-macros.at        |  1 -
>   utilities/bugtool/automake.mk           |  2 -
>   utilities/ovn-detrace.in                |  2 +-
>   utilities/ovn-docker-overlay-driver.in  |  2 +-
>   utilities/ovn-docker-underlay-driver.in |  2 +-
>   21 files changed, 28 insertions(+), 231 deletions(-)
> 
> diff --git a/Makefile.am b/Makefile.am
> index 1e41e49ea..8eed7a72b 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -71,7 +71,7 @@ endif
>   # foo/__init__.pyc will cause Python to ignore foo.py.
>   run_python = \
>   	PYTHONPATH=$(OVS_SRCDIR)/python$(psep)$$PYTHONPATH \
> -	PYTHONDONTWRITEBYTECODE=yes $(PYTHON)
> +	PYTHONDONTWRITEBYTECODE=yes $(PYTHON3)
>   
>   ALL_LOCAL =
>   BUILT_SOURCES =
> @@ -165,13 +165,13 @@ ro_shell = printf '\043 Generated automatically -- do not modify!    -*- buffer-
>   
>   SUFFIXES += .in
>   .in:
> -	$(AM_V_GEN)PYTHONPATH=$(OVS_SRCDIR)/python$(psep)$$PYTHONPATH$(psep)$(srcdir)/python $(PYTHON) $(srcdir)/build-aux/soexpand.py -I$(srcdir) -I$(OVS_SRCDIR) < $< | \
> -	  $(PYTHON) $(srcdir)/build-aux/dpdkstrip.py $(DPDKSTRIP_FLAGS) | \
> +	$(AM_V_GEN)PYTHONPATH=$(OVS_SRCDIR)/python$(psep)$$PYTHONPATH$(psep)$(srcdir)/python $(PYTHON3) $(srcdir)/build-aux/soexpand.py -I$(srcdir) -I$(OVS_SRCDIR) < $< | \
> +	  $(PYTHON3) $(srcdir)/build-aux/dpdkstrip.py $(DPDKSTRIP_FLAGS) | \
>   	  sed \
>   	    -e 's,[@]PKIDIR[@],$(PKIDIR),g' \
>   	    -e 's,[@]LOGDIR[@],$(LOGDIR),g' \
>   	    -e 's,[@]DBDIR[@],$(DBDIR),g' \
> -	    -e 's,[@]PYTHON[@],$(PYTHON),g' \
> +	    -e 's,[@]PYTHON3[@],$(PYTHON3),g' \
>   	    -e 's,[@]OVN_RUNDIR[@],$(OVN_RUNDIR),g' \
>   	    -e 's,[@]OVSBUILDDIR[@],$(OVSBUILDDIR),g' \
>   	    -e 's,[@]VERSION[@],$(VERSION),g' \
> @@ -197,7 +197,7 @@ SUFFIXES += .xml
>   	  PKIDIR='$(PKIDIR)' \
>   	  LOGDIR='$(LOGDIR)' \
>   	  DBDIR='$(DBDIR)' \
> -	  PYTHON='$(PYTHON)' \
> +	  PYTHON3='$(PYTHON3)' \
>   	  RUNDIR='$(RUNDIR)' \
>   	  OVN_RUNDIR='$(OVN_RUNDIR)' \
>   	  VERSION='$(VERSION)' \
> @@ -425,7 +425,7 @@ CLEANFILES += flake8-check
>   
>   include $(srcdir)/manpages.mk
>   $(srcdir)/manpages.mk: $(MAN_ROOTS) build-aux/sodepends.py $(OVS_SRCDIR)/python/build/soutil.py
> -	@PYTHONPATH=$(OVS_SRCDIR)/python$(psep)$$PYTHONPATH$(psep)$(srcdir)/python $(PYTHON) $(srcdir)/build-aux/sodepends.py -I. -I$(srcdir) -I$(OVS_MANDIR) $(MAN_ROOTS) >$(@F).tmp
> +	@PYTHONPATH=$(OVS_SRCDIR)/python$(psep)$$PYTHONPATH$(psep)$(srcdir)/python $(PYTHON3) $(srcdir)/build-aux/sodepends.py -I. -I$(srcdir) -I$(OVS_MANDIR) $(MAN_ROOTS) >$(@F).tmp
>   	@if cmp -s $(@F).tmp $@; then \
>   	  touch $@; \
>   	  rm -f $(@F).tmp; \
> diff --git a/automake.mk b/automake.mk
> index ad801f1e5..591e00751 100644
> --- a/automake.mk
> +++ b/automake.mk
> @@ -6,19 +6,17 @@ CLEANFILES += ovn-architecture.7
>   #
>   # If "python" or "dot" is not available, then we do not add graphical diagram
>   # to the documentation.
> -if HAVE_PYTHON
>   if HAVE_DOT
>   OVSDB_DOT = $(run_python) ${OVSDIR}/ovsdb/ovsdb-dot.in
>   ovn-nb.gv: ${OVSDIR}/ovsdb/ovsdb-dot.in $(srcdir)/ovn-nb.ovsschema
>   	$(AM_V_GEN)$(OVSDB_DOT) --no-arrows $(srcdir)/ovn-nb.ovsschema > $@
>   ovn-nb.pic: ovn-nb.gv ${OVSDIR}/ovsdb/dot2pic
> -	$(AM_V_GEN)(dot -T plain < ovn-nb.gv | $(PYTHON) ${OVSDIR}/ovsdb/dot2pic -f 3) > $@.tmp && \
> +	$(AM_V_GEN)(dot -T plain < ovn-nb.gv | $(PYTHON3) ${OVSDIR}/ovsdb/dot2pic -f 3) > $@.tmp && \
>   	mv $@.tmp $@
>   OVN_NB_PIC = ovn-nb.pic
>   OVN_NB_DOT_DIAGRAM_ARG = --er-diagram=$(OVN_NB_PIC)
>   CLEANFILES += ovn-nb.gv ovn-nb.pic
>   endif
> -endif
>   
>   # OVN northbound schema documentation
>   EXTRA_DIST += ovn-nb.xml
> @@ -39,18 +37,16 @@ ovn-nb.5: \
>   #
>   # If "python" or "dot" is not available, then we do not add graphical diagram
>   # to the documentation.
> -if HAVE_PYTHON
>   if HAVE_DOT
>   ovn-sb.gv: ${OVSDIR}/ovsdb/ovsdb-dot.in $(srcdir)/ovn-sb.ovsschema
>   	$(AM_V_GEN)$(OVSDB_DOT) --no-arrows $(srcdir)/ovn-sb.ovsschema > $@
>   ovn-sb.pic: ovn-sb.gv ${OVSDIR}/ovsdb/dot2pic
> -	$(AM_V_GEN)(dot -T plain < ovn-sb.gv | $(PYTHON) ${OVSDIR}/ovsdb/dot2pic -f 3) > $@.tmp && \
> +	$(AM_V_GEN)(dot -T plain < ovn-sb.gv | $(PYTHON3) ${OVSDIR}/ovsdb/dot2pic -f 3) > $@.tmp && \
>   	mv $@.tmp $@
>   OVN_SB_PIC = ovn-sb.pic
>   OVN_SB_DOT_DIAGRAM_ARG = --er-diagram=$(OVN_SB_PIC)
>   CLEANFILES += ovn-sb.gv ovn-sb.pic
>   endif
> -endif
>   
>   # OVN southbound schema documentation
>   EXTRA_DIST += ovn-sb.xml
> diff --git a/build-aux/dpdkstrip.py b/build-aux/dpdkstrip.py
> index 48c7f0693..b8b8ba9c8 100755
> --- a/build-aux/dpdkstrip.py
> +++ b/build-aux/dpdkstrip.py
> @@ -1,4 +1,4 @@
> -#! /usr/bin/env python
> +#! /usr/bin/env python3
>   # Copyright (c) 2017 Red Hat, Inc.
>   #
>   # Licensed under the Apache License, Version 2.0 (the "License");
> diff --git a/build-aux/sodepends.py b/build-aux/sodepends.py
> index 90cfaa0f7..45812bcbd 100755
> --- a/build-aux/sodepends.py
> +++ b/build-aux/sodepends.py
> @@ -1,4 +1,4 @@
> -#! /usr/bin/env python
> +#! /usr/bin/env python3
>   
>   # Copyright (c) 2008, 2011, 2017 Nicira, Inc.
>   #
> diff --git a/build-aux/soexpand.py b/build-aux/soexpand.py
> index 53ca64073..00adcf47a 100755
> --- a/build-aux/soexpand.py
> +++ b/build-aux/soexpand.py
> @@ -1,4 +1,4 @@
> -#! /usr/bin/env python
> +#! /usr/bin/env python3
>   
>   # Copyright (c) 2008, 2017 Nicira, Inc.
>   #
> diff --git a/configure.ac b/configure.ac
> index 78498181c..9b29cbfe4 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -89,9 +89,7 @@ OVN_CHECK_COVERAGE
>   OVS_CHECK_NDEBUG
>   OVS_CHECK_OPENSSL
>   OVN_CHECK_LOGDIR
> -OVN_CHECK_PYTHON2
>   OVN_CHECK_PYTHON3
> -OVN_CHECK_PYTHON
>   OVN_CHECK_FLAKE8
>   OVN_CHECK_SPHINX
>   OVN_CHECK_DOT
> diff --git a/ipsec/ovs-monitor-ipsec.in b/ipsec/ovs-monitor-ipsec.in
> index 4710be039..37e370324 100755
> --- a/ipsec/ovs-monitor-ipsec.in
> +++ b/ipsec/ovs-monitor-ipsec.in
> @@ -1,4 +1,4 @@
> -#! @PYTHON@
> +#! @PYTHON3@
>   # Copyright (c) 2017 Nicira, Inc.
>   #
>   # Licensed under the Apache License, Version 2.0 (the "License");
> diff --git a/m4/ovn.m4 b/m4/ovn.m4
> index 277468f7f..dacfabb2a 100644
> --- a/m4/ovn.m4
> +++ b/m4/ovn.m4
> @@ -300,57 +300,16 @@ dnl Checks for valgrind/valgrind.h.
>   AC_DEFUN([OVN_CHECK_VALGRIND],
>     [AC_CHECK_HEADERS([valgrind/valgrind.h])])
>   
> -dnl Checks for Python 2.x, x >= 7.
> -AC_DEFUN([OVN_CHECK_PYTHON2],
> -  [AC_CACHE_CHECK(
> -     [for Python 2.x for x >= 7],
> -     [ovs_cv_python2],
> -     [if test -n "$PYTHON2"; then
> -        ovs_cv_python2=$PYTHON2
> -      else
> -        ovs_cv_python2=no
> -        for binary in python2 python2.7 python; do
> -          ovs_save_IFS=$IFS; IFS=$PATH_SEPARATOR
> -          for dir in $PATH; do
> -            IFS=$ovs_save_IFS
> -            test -z "$dir" && dir=.
> -            if test -x "$dir"/"$binary" && "$dir"/"$binary" -c 'import sys
> -if sys.hexversion >= 0x02070000 and sys.hexversion < 0x03000000:
> -    sys.exit(0)
> -else:
> -    sys.exit(1)'; then
> -              ovs_cv_python2=$dir/$binary
> -              break 2
> -            fi
> -          done
> -        done
> -        if test "$ovs_cv_python2" != no && test -x "$ovs_cv_python2"; then
> -          if ! "$ovs_cv_python2" -c 'import six ; six.moves.range' >&AS_MESSAGE_LOG_FD 2>&1; then
> -            ovs_cv_python2=no
> -            AC_MSG_WARN([Missing Python six library or version too old.])
> -          fi
> -        fi
> -      fi])
> -   AC_SUBST([HAVE_PYTHON2])
> -   AM_MISSING_PROG([PYTHON2], [python2])
> -   if test "$ovs_cv_python2" != no; then
> -     PYTHON2=$ovs_cv_python2
> -     HAVE_PYTHON2=yes
> -   else
> -     HAVE_PYTHON2=no
> -   fi
> -   AM_CONDITIONAL([HAVE_PYTHON2], [test "$HAVE_PYTHON2" = yes])])
> -
> -dnl Checks for Python 3.x, x >= 4.
> +dnl Checks for Python 3.4 or later.
>   AC_DEFUN([OVN_CHECK_PYTHON3],
>     [AC_CACHE_CHECK(
> -     [for Python 3.x for x >= 4],
> +     [for Python 3 (version 3.4 or later)],
>        [ovs_cv_python3],
>        [if test -n "$PYTHON3"; then
>           ovs_cv_python3=$PYTHON3
>         else
>           ovs_cv_python3=no
> -        for binary in python3 python3.4; do
> +        for binary in python3 python3.4 python3.5 python3.6 python3.7; do
>             ovs_save_IFS=$IFS; IFS=$PATH_SEPARATOR
>             for dir in $PATH; do
>               IFS=$ovs_save_IFS
> @@ -365,46 +324,12 @@ else:
>               fi
>             done
>           done
> -        if test "$ovs_cv_python3" != no; then
> -          if test -x "$ovs_cv_python3" && ! "$ovs_cv_python3" -c 'import six' >/dev/null 2>&1; then
> -            ovs_cv_python3=no
> -            AC_MSG_WARN([Missing Python six library.])
> -          fi
> -        fi
>         fi])
> -   AC_SUBST([HAVE_PYTHON3])
> -   AM_MISSING_PROG([PYTHON3], [python3])
> -   if test "$ovs_cv_python3" != no; then
> -     PYTHON3=$ovs_cv_python3
> -     HAVE_PYTHON3=yes
> -   else
> -     HAVE_PYTHON3=no
> +   if test "$ovs_cv_python3" = no; then
> +     AC_MSG_ERROR([Python 3.4 or later is required but not found in $PATH, please install it or set $PYTHON3 to point to it])
>      fi
> -   AM_CONDITIONAL([HAVE_PYTHON3], [test "$HAVE_PYTHON3" = yes])])
> -
> -dnl Checks if you have any compatible Python version installed.
> -dnl Python 2.7+ has the preference to 3.4+
> -AC_DEFUN([OVN_CHECK_PYTHON],
> -  [AC_CACHE_CHECK(
> -     [for Python 2 or 3],
> -     [ovs_cv_python],
> -     [if test -n "$PYTHON"; then
> -        ovs_cv_python=$PYTHON
> -      else
> -        ovs_cv_python=no
> -        if test "$ovs_cv_python2" != no; then
> -          ovs_cv_python=$ovs_cv_python2
> -        elif test "$ovs_cv_python3" != no; then
> -          ovs_cv_python=$ovs_cv_python3
> -        else
> -          AC_MSG_ERROR([Missing Python.])
> -        fi
> -      fi])
> -    AC_SUBST([PYTHON])
> -    PYTHON=$ovs_cv_python
> -    AC_SUBST([HAVE_PYTHON])
> -    HAVE_PYTHON=yes
> -    AM_CONDITIONAL([HAVE_PYTHON], [test "$HAVE_PYTHON" = yes])])
> +   AC_ARG_VAR([PYTHON3])
> +   PYTHON3=$ovs_cv_python3])
>   
>   dnl Checks for flake8.
>   AC_DEFUN([OVN_CHECK_FLAKE8],
> diff --git a/rhel/ovn-fedora.spec.in b/rhel/ovn-fedora.spec.in
> index 447b4fe6e..acde99793 100644
> --- a/rhel/ovn-fedora.spec.in
> +++ b/rhel/ovn-fedora.spec.in
> @@ -16,11 +16,6 @@
>   # as regular user, specify the '--without libcapng'
>   %bcond_without libcapng
>   
> -# 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
> -
>   # Enable PIE, bz#955181
>   %global _hardened_build 1
>   
> @@ -30,16 +25,6 @@
>   %define _rundir /run
>   %endif
>   
> -# define the python package prefix based on distribution version so that we can
> -# simultaneously support RHEL-based and later Fedora versions in this spec file.
> -%if 0%{?fedora} >= 25
> -%define _py2 python2
> -%endif
> -
> -%if 0%{?rhel} || 0%{?fedora} < 25
> -%define _py2 python
> -%endif
> -
>   Name: ovn
>   Summary: Open Virtual Network support
>   Group: System Environment/Daemons
> @@ -61,16 +46,12 @@ Source10: http://openvswitch.org/releases/openvswitch-%{ovsver}.tar.gz
>   BuildRequires: gcc gcc-c++
>   BuildRequires: autoconf automake libtool
>   BuildRequires: systemd-units openssl openssl-devel
> -BuildRequires: %{_py2}-devel
> -%if 0%{?fedora} > 22 || %{with build_python3}
>   BuildRequires: python3-devel
> -%endif
>   BuildRequires: desktop-file-utils
>   BuildRequires: groff graphviz
>   BuildRequires: checkpolicy, selinux-policy-devel
>   BuildRequires: /usr/bin/sphinx-build
>   # make check dependencies
> -BuildRequires: %{_py2}-twisted%{?rhel:-core} %{_py2}-zope-interface %{_py2}-six
>   BuildRequires: procps-ng
>   %if %{with libcapng}
>   BuildRequires: libcap-ng libcap-ng-devel
> @@ -127,7 +108,7 @@ OVN vtep controller
>   %package docker
>   Summary: Open Virtual Network support
>   License: ASL 2.0
> -Requires: ovn %{_py2}-openvswitch
> +Requires: ovn python3-openvswitch
>   Obsoletes: openvswitch-ovn-docker
>   Provides: openvswitch-ovn-docker = %{?epoch:%{epoch}:}%{version}-%{release}
>   
> @@ -153,12 +134,7 @@ cd openvswitch-%{ovsver}
>   %endif
>           --enable-ssl \
>           --with-pkidir=%{_sharedstatedir}/openvswitch/pki \
> -%if 0%{?fedora} > 22 || %{with build_python3}
> -        PYTHON3=%{__python3} \
> -        PYTHON=%{__python2}
> -%else
> -        PYTHON=%{__python}
> -%endif
> +        PYTHON3=%{__python3}
>   
>   make %{?_smp_mflags}
>   cd -
> @@ -173,12 +149,7 @@ cd -
>   %endif
>           --enable-ssl \
>           --with-pkidir=%{_sharedstatedir}/openvswitch/pki \
> -%if 0%{?fedora} > 22 || %{with build_python3}
> -        PYTHON3=%{__python3} \
> -        PYTHON=%{__python2}
> -%else
> -        PYTHON=%{__python}
> -%endif
> +        PYTHON3=%{__python3}
>   
>   make %{?_smp_mflags}
>   
> diff --git a/tests/atlocal.in b/tests/atlocal.in
> index f79473583..6976518ce 100644
> --- a/tests/atlocal.in
> +++ b/tests/atlocal.in
> @@ -1,23 +1,13 @@
>   # -*- shell-script -*-
>   HAVE_OPENSSL='@HAVE_OPENSSL@'
>   OPENSSL_SUPPORTS_SNI='@OPENSSL_SUPPORTS_SNI@'
> -HAVE_PYTHON='@HAVE_PYTHON@'
> -HAVE_PYTHON2='@HAVE_PYTHON2@'
>   HAVE_PYTHON3='@HAVE_PYTHON3@'
>   HAVE_UNBOUND='@HAVE_UNBOUND@'
>   EGREP='@EGREP@'
>   
> -if test x"$PYTHON" = x; then
> -    PYTHON='@PYTHON@'
> -fi
> -
> -if test x"$PYTHON2" = x; then
> -    PYTHON2='@PYTHON2@'
> -fi
> -
>   if test x"$PYTHON3" = x; then
>       PYTHON3='@PYTHON3@'
> -
> +    PYTHON='@PYTHON3@'
>       # PYTHONCOERCECLOCALE=0 disables the Unicode compatibility warning on
>       # stderr that breaks almost any Python3 test (PEP 0538)
>       PYTHONCOERCECLOCALE=0
> @@ -149,8 +139,8 @@ find_l7_lib()
>   {
>       set +x
>       var=HAVE_`echo "$1" | tr '[a-z]' '[A-Z]'`
> -    if test "$HAVE_PYTHON" = "yes"; then
> -        result=$($PYTHON $abs_top_srcdir/tests/test-l7.py --help | grep "$1")
> +    if test "$HAVE_PYTHON3" = "yes"; then
> +        result=$($PYTHON3 $abs_top_srcdir/tests/test-l7.py --help | grep "$1")
>           if test "x${result}" != x; then
>               eval ${var}="yes"
>           else
> diff --git a/tests/checkpatch.at b/tests/checkpatch.at
> index fe21acdf2..caf772884 100755
> --- a/tests/checkpatch.at
> +++ b/tests/checkpatch.at
> @@ -6,7 +6,6 @@ OVS_START_SHELL_HELPERS
>   # Runs checkpatch under Python 2 and Python 3, if installed, on the given
>   # PATCH, expecting the specified set of ERRORS (and warnings).
>   try_checkpatch() {
> -    AT_SKIP_IF([test $HAVE_PYTHON2 = no && test $HAVE_PYTHON3 = no])
>       # Take the patch to test from $1.  Remove an initial four-space indent
>       # from it and, if it is just headers with no body, add a null body.
>       echo "$1" | sed 's/^    //' > test.patch
> @@ -22,7 +21,6 @@ try_checkpatch() {
>           : > expout
>       fi
>   
> -    try_checkpatch__ "$HAVE_PYTHON2" "$PYTHON2"
>       try_checkpatch__ "$HAVE_PYTHON3" "$PYTHON3"
>   }
>   try_checkpatch__() {
> diff --git a/tests/ovn-controller-vtep.at b/tests/ovn-controller-vtep.at
> index d4744d76e..3092dd5ca 100644
> --- a/tests/ovn-controller-vtep.at
> +++ b/tests/ovn-controller-vtep.at
> @@ -15,7 +15,6 @@ m4_define([OVN_CONTROLLER_VTEP_START],
>     [
>      AT_KEYWORDS([ovn])
>      # this will cause skip when 'make check' using Windows setup.
> -   AT_SKIP_IF([test $HAVE_PYTHON = no])
>   
>      dnl Create databases (ovn-nb, ovn-sb, vtep).
>      AT_CHECK([ovsdb-tool create vswitchd.db $ovs_srcdir/vswitchd/vswitch.ovsschema])
> diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at
> index 989ed4f47..12597d3ad 100644
> --- a/tests/ovn-northd.at
> +++ b/tests/ovn-northd.at
> @@ -1,6 +1,5 @@
>   AT_BANNER([OVN northd])
>   AT_SETUP([ovn -- check   from NBDB to SBDB])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   ovn-nbctl create Logical_Router name=R1
> @@ -151,7 +150,6 @@ AT_CHECK([ovn-sbctl list ha_chassis_group | wc -l], [0], [0
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- check Gateway_Chassis propagation from NBDB to SBDB backwards compatibility])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   ovn-nbctl create Logical_Router name=R1
> @@ -200,7 +198,6 @@ AT_CHECK([ovn-sbctl list ha_chassis_group | wc -l], [0], [0
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- check up state of VIF LSP])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   ovn-nbctl ls-add S1
> @@ -214,7 +211,6 @@ AT_CHECK([test x`ovn-nbctl lsp-get-up S1-vm1` = xup])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- check up state of router LSP linked to a distributed LR])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   ovn-nbctl lr-add R1
> @@ -230,7 +226,6 @@ AT_CHECK([test x`ovn-nbctl lsp-get-up S1-R1` = xup])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- check up state of router LSP linked to a gateway LR])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   ovn-sbctl chassis-add gw1 geneve 127.0.0.1
> @@ -250,7 +245,6 @@ AT_CHECK([test x`ovn-nbctl lsp-get-up S1-R1` = xup])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- check up state of router LSP linked to an LRP with set Gateway Chassis])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   ovn-sbctl chassis-add gw1 geneve 127.0.0.1
> @@ -418,7 +412,6 @@ OVS_APP_EXIT_AND_WAIT([ovn-northd])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- check HA_Chassis_Group propagation from NBDB to SBDB])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   ovn-nbctl --wait=sb ha-chassis-group-add hagrp1
> @@ -900,7 +893,6 @@ OVS_APP_EXIT_AND_WAIT([ovn-northd])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- ovn-northd pause and resume])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   AT_CHECK([test xfalse = x`as northd ovs-appctl -t ovn-northd is-paused`])
> @@ -938,7 +930,6 @@ OVS_WAIT_UNTIL([
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- check Redirect Chassis propagation from NB to SB])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   ovn-sbctl chassis-add gw1 geneve 127.0.0.1
> @@ -968,7 +959,6 @@ OVS_WAIT_UNTIL([ovn-sbctl get Port_Binding ${uuid} options:redirect-type], [0],
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- check stateless dnat_and_snat rule])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   ovn-sbctl chassis-add gw1 geneve 127.0.0.1
> diff --git a/tests/ovn.at b/tests/ovn.at
> index 5fc2de2d3..efa89849e 100644
> --- a/tests/ovn.at
> +++ b/tests/ovn.at
> @@ -1490,7 +1490,6 @@ AT_BANNER([OVN end-to-end tests])
>   # 3 hypervisors, one logical switch, 3 logical ports per hypervisor
>   AT_SETUP([ovn -- 3 HVs, 1 LS, 3 lports/HV])
>   AT_KEYWORDS([ovnarp])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   # Create hypervisors hv[123].
> @@ -1785,7 +1784,6 @@ AT_CLEANUP
>   # logical ports bound to chassis encap-ip.
>   AT_SETUP([ovn -- 2 HVs, 1 LS, 2 lports/HV])
>   AT_KEYWORDS([ovnarp])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   # Create hypervisors hv[12].
> @@ -1962,7 +1960,6 @@ OVN_CLEANUP([hv1],[hv2])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- trace 1 LS, 3 LSPs])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   # Create a logical switch and some logical ports.
> @@ -2185,7 +2182,6 @@ AT_CLEANUP
>   # 2 locally attached networks (one flat, one vlan tagged over same device)
>   # 2 ports per HV on each network
>   AT_SETUP([ovn -- 2 HVs, 4 lports/HV, localnet ports])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   # In this test cases we create 3 switches, all connected to same
> @@ -2379,7 +2375,6 @@ AT_CLEANUP
>   
>   AT_SETUP([ovn -- vtep: 3 HVs, 1 VIFs/HV, 1 GW, 1 LS])
>   AT_KEYWORDS([vtep])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   # Configure the Northbound database
> @@ -2581,7 +2576,6 @@ AT_CLEANUP
>   
>   # Similar test to "hardware GW"
>   AT_SETUP([ovn -- 3 HVs, 1 VIFs/HV, 1 software GW, 1 LS])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   # Configure the Northbound database
> @@ -2730,7 +2724,6 @@ AT_CLEANUP
>   
>   # 3 hypervisors, 3 logical switches with 3 logical ports each, 1 logical router
>   AT_SETUP([ovn -- 3 HVs, 3 LS, 3 lports/LS, 1 LR])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   # Logical network:
> @@ -3139,7 +3132,6 @@ OVN_CLEANUP([hv1], [hv2], [hv3])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- IP relocation using GARP request])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   # Logical network:
> @@ -3342,7 +3334,6 @@ AT_CLEANUP
>   
>   # 3 hypervisors, one logical switch, 3 logical ports per hypervisor
>   AT_SETUP([ovn -- portsecurity : 3 HVs, 1 LS, 3 lports/HV])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   # Create hypervisors hv[123].
> @@ -3719,7 +3710,6 @@ OVN_CLEANUP([hv1],[hv2],[hv3])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- 2 HVs, 2 LS, 1 lport/LS, 2 peer LRs])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   # Logical network:
> @@ -3866,7 +3856,6 @@ AT_CLEANUP
>   
>   AT_SETUP([ovn -- 1 HV, 1 LS, 2 lport/LS, 1 LR])
>   AT_KEYWORDS([router-admin-state])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   # Logical network:
> @@ -3978,7 +3967,6 @@ AT_CLEANUP
>   
>   AT_SETUP([ovn -- 1 HV, 2 LSs, 1 lport/LS, 1 LR])
>   AT_KEYWORDS([router-admin-state])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   # Logical network:
> @@ -4093,7 +4081,6 @@ OVN_CLEANUP([hv1])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- 2 HVs, 3 LS, 1 lport/LS, 2 peer LRs, static routes])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   # Logical network:
> @@ -4246,7 +4233,6 @@ OVN_CLEANUP([hv1],[hv2])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- send gratuitous arp on localnet])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   ovn-nbctl ls-add lsw0
>   net_add n1
> @@ -4300,7 +4286,6 @@ OVN_CLEANUP([hv])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- 2 HVs, 3 LRs connected via LS, static routes])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   # Logical network:
> @@ -4477,7 +4462,6 @@ OVN_CLEANUP([hv1],[hv2])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- dhcpv4 : 1 HV, 2 LS, 2 LSPs/LS])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   ovn-nbctl ls-add ls1
> @@ -4910,7 +4894,6 @@ OVN_CLEANUP([hv1])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- dhcpv6 : 1 HV, 2 LS, 5 LSPs])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   ovn-nbctl ls-add ls1
> @@ -5182,7 +5165,6 @@ OVN_CLEANUP([hv1])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- 2 HVs, 2 LRs connected via LS, gateway router])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   # Logical network:
> @@ -5359,7 +5341,6 @@ AT_CLEANUP
>   
>   AT_SETUP([ovn -- icmp_reply: 1 HVs, 2 LSs, 1 lport/LS, 1 LR])
>   AT_KEYWORDS([router-icmp-reply])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   # Logical network:
> @@ -5505,7 +5486,6 @@ AT_CLEANUP
>   
>   AT_SETUP([ovn -- policy-based routing: 1 HVs, 2 LSs, 1 lport/LS, 1 LR])
>   AT_KEYWORDS([policy-based-routing])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   # Logical network:
> @@ -5691,7 +5671,6 @@ AT_CLEANUP
>   
>   AT_SETUP([ovn -- policy-based routing IPv6: 1 HVs, 3 LSs, 1 lport/LS, 1 LR])
>   AT_KEYWORDS([policy-based-routing])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   # Logical network:
> @@ -5968,7 +5947,6 @@ OVN_CLEANUP([hv1])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- nd_na ])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   #TODO: since patch port for IPv6 logical router port is not ready not,
> @@ -6067,7 +6045,6 @@ OVN_CLEANUP([hv1])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- ipam])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   # Add a port to a switch that does not have a subnet set, then set the
> @@ -6479,7 +6456,6 @@ OVS_APP_EXIT_AND_WAIT([ovn-northd])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- ipam connectivity])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   ovn-nbctl lr-add R1
> @@ -6609,7 +6585,6 @@ AT_CLEANUP
>   
>   AT_SETUP([ovn -- ovs-vswitchd restart])
>   AT_KEYWORDS([vswitchd])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   ovn-nbctl ls-add ls1
> @@ -6703,7 +6678,6 @@ OVN_CLEANUP([hv1])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- send arp for nexthop])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   # Topology: Two LSs - ls1 and ls2 are connected via router r0
> @@ -6813,7 +6787,6 @@ OVN_CLEANUP([hv1])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- send gratuitous arp for nat ips in localnet])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   # Create logical switch
>   ovn-nbctl ls-add ls0
> @@ -6865,7 +6838,6 @@ OVN_CLEANUP([hv1])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- send gratuitous arp with nat-addresses router in localnet])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   # Create logical switch
>   ovn-nbctl ls-add ls0
> @@ -6963,7 +6935,6 @@ OVN_CLEANUP([hv1])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- conntrack zone allocation])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   # Logical network:
> @@ -7517,7 +7488,6 @@ OVN_CLEANUP([hv])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- read-only sb db:ptcp access])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   
>   : > .$1.db.~lock~
>   ovsdb-tool create ovn-sb.db "$abs_top_srcdir"/ovn-sb.ovsschema
> @@ -7553,7 +7523,6 @@ OVS_APP_EXIT_AND_WAIT([ovsdb-server])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- read-only sb db:pssl access])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   AT_SKIP_IF([test "$HAVE_OPENSSL" = no])
>   PKIDIR="$(cd $abs_top_builddir/tests && pwd)"
>   AT_SKIP_IF([expr "$PKIDIR" : ".*[ 	'\"
> @@ -7610,7 +7579,6 @@ OVS_APP_EXIT_AND_WAIT([ovsdb-server])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- nb connection/ssl commands])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   AT_SKIP_IF([test "$HAVE_OPENSSL" = no])
>   PKIDIR="$(cd $abs_top_builddir/tests && pwd)"
>   AT_SKIP_IF([expr "$PKIDIR" : ".*[ 	'\"
> @@ -7662,7 +7630,6 @@ OVS_APP_EXIT_AND_WAIT([ovsdb-server])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- sb connection/ssl commands])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   AT_SKIP_IF([test "$HAVE_OPENSSL" = no])
>   PKIDIR="$(cd $abs_top_builddir/tests && pwd)"
>   AT_SKIP_IF([expr "$PKIDIR" : ".*[ 	'\"
> @@ -7919,7 +7886,6 @@ OVN_CLEANUP([hv1],[hv2])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- 3 HVs, 3 LRs connected via LS, source IP based routes])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   # Logical network:
> @@ -8120,7 +8086,6 @@ OVN_CLEANUP([hv1],[hv2],[hv3])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- dns lookup : 1 HV, 2 LS, 2 LSPs/LS])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   ovn-nbctl ls-add ls1
> @@ -8534,7 +8499,6 @@ OVN_CLEANUP([hv1])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- 4 HV, 1 LS, 1 LR, packet test with HA distributed router gateway port])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   net_add n1
> @@ -8761,7 +8725,6 @@ OVN_CLEANUP([hv1],[gw1],[ext1])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- 4 HV, 3 LS, 2 LR, packet test with HA distributed router gateway port])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   net_add n1
> @@ -8980,7 +8943,6 @@ OVN_CLEANUP([hv1],[gw1],[gw2],[ext1])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- 1 LR with distributed router gateway port])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   # Logical network:
> @@ -9308,7 +9270,6 @@ OVN_CLEANUP([hv1],[hv2],[hv3])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- send gratuitous arp for NAT rules on distributed router])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   # Create logical switches
>   ovn-nbctl ls-add ls0
> @@ -9450,7 +9411,6 @@ AT_CLEANUP
>   # gateway port should use vlans(i.e input network vlan tag) across hypervisors
>   # instead of tunneling.
>   AT_SETUP([ovn -- vlan traffic for external network with distributed router gateway port])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   # Logical network:
> @@ -9769,7 +9729,6 @@ AT_CLEANUP
>   
>   AT_SETUP([ovn -- IPv6 ND Router Solicitation responder])
>   AT_KEYWORDS([ovn-nd_ra])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   # In this test case we create 1 lswitch with 3 VIF ports attached,
> @@ -10017,7 +9976,6 @@ OVN_CLEANUP([hv1])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- /32 router IP address])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   # Logical network:
> @@ -10115,7 +10073,6 @@ OVN_CLEANUP([hv1],[hv2])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- 2 HVs, 1 lport/HV, localport ports])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   ovn-nbctl ls-add ls1
> @@ -10237,7 +10194,6 @@ OVN_CLEANUP([hv1],[hv2])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- 1 LR with HA distributed router gateway port])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   net_add n1
> @@ -10792,7 +10748,6 @@ OVN_CLEANUP([gw1],[gw2],[hv1],[hv2])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- send gratuitous ARP for NAT rules on HA distributed router])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   ovn-nbctl ls-add ls0
>   ovn-nbctl ls-add ls1
> @@ -10963,7 +10918,6 @@ OVN_CLEANUP([hv1],[hv2],[hv3])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- ensure one gw controller restart in HA doesn't bounce the master])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   net_add n1
> @@ -11060,7 +11014,6 @@ AT_CLEANUP
>   
>   AT_SETUP([ovn -- IPv6 Neighbor Solicitation for unknown MAC])
>   AT_KEYWORDS([ovn-nd_ns for unknown mac])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   ovn-nbctl ls-add sw0_ip6
> @@ -11523,7 +11476,6 @@ AT_CLEANUP
>   
>   AT_SETUP([ovn -- ACL reject rule test])
>   AT_KEYWORDS([acl-reject])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   # test_ip_packet INPORT HV ETH_SRC ETH_DST IPV4_SRC IPV4_DST IP_CHKSUM EXP_IP_CHKSUM EXP_ICMP_CHKSUM
> @@ -11665,7 +11617,6 @@ AT_CLEANUP
>   
>   AT_SETUP([ovn -- Port Groups])
>   AT_KEYWORDS([ovnpg])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   # Logical network:
> @@ -11891,7 +11842,6 @@ AT_CLEANUP
>   
>   AT_SETUP([ovn -- ACLs on Port Groups])
>   AT_KEYWORDS([ovnpg_acl])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   # Logical network:
> @@ -12377,7 +12327,6 @@ AT_CLEANUP
>   
>   AT_SETUP([ovn -- TTL exceeded])
>   AT_KEYWORDS([ttl-exceeded])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   # test_ip_packet INPORT HV ETH_SRC ETH_DST IPV4_SRC IPV4_DST IPV4_ROUTER IP_CHKSUM EXP_IP_CHKSUM EXP_ICMP_CHKSUM
> @@ -12474,7 +12423,6 @@ AT_CLEANUP
>   
>   AT_SETUP([ovn -- router port unreachable])
>   AT_KEYWORDS([router-port-unreachable])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   # test_ip_packet INPORT HV ETH_SRC ETH_DST IPV4_SRC IPV4_ROUTER L4_PROTCOL IP_CHKSUM EXP_IP_CHKSUM EXP_ICMP_CHKSUM EXP_ICMP_CODE
> @@ -12623,7 +12571,6 @@ OVN_CLEANUP([hv1], [hv2])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- ovn-controller exit])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   # Logical network:
>   # One Logical Router: ro, with two logical switches sw1 and sw2.
> @@ -12714,7 +12661,6 @@ OVN_CLEANUP([hv1],[hv2])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- external logical port])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   net_add n1
> @@ -13450,7 +13396,6 @@ AT_CLEANUP
>   
>   AT_SETUP([ovn -- Address Set Incremental Processing])
>   AT_KEYWORDS([ovn_as_inc])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   net_add n1
> @@ -13524,7 +13469,6 @@ OVN_CLEANUP([hv1])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- ovn-controller restart])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   # Logical network:
> @@ -13677,7 +13621,6 @@ AT_CLEANUP
>   
>   AT_SETUP([ovn -- router - check packet length - icmp defrag])
>   AT_KEYWORDS([check packet length])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   ovn-nbctl ls-add sw0
> @@ -13852,7 +13795,6 @@ AT_CLEANUP
>   
>   AT_SETUP([ovn -- IP packet buffering])
>   AT_KEYWORDS([ip-buffering])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   # Logical network:
> @@ -13997,7 +13939,6 @@ OVN_CLEANUP([hv1],[hv2])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- neighbor update on same HV])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   # Logical network:
> @@ -14507,7 +14448,6 @@ AT_CLEANUP
>   
>   AT_SETUP([ovn -- virtual ports])
>   AT_KEYWORDS([virtual ports])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   send_garp() {
> @@ -14932,7 +14872,6 @@ OVN_CLEANUP([hv1], [hv2])
>   AT_CLEANUP
>   
>   AT_SETUP([ovn -- IGMP snoop/querier/relay])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   # Logical network:
> @@ -16112,7 +16051,6 @@ AT_CLEANUP
>   
>   AT_SETUP([ovn -- ARP lookup before learning])
>   AT_KEYWORDS([virtual ports])
> -AT_SKIP_IF([test $HAVE_PYTHON = no])
>   ovn_start
>   
>   send_garp() {
> diff --git a/tests/ovsdb-macros.at b/tests/ovsdb-macros.at
> index 83e3df750..7664a53cd 100644
> --- a/tests/ovsdb-macros.at
> +++ b/tests/ovsdb-macros.at
> @@ -38,7 +38,6 @@ m4_define([OVSDB_CHECK_POSITIVE],
>   # TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
>   m4_define([OVSDB_CHECK_POSITIVE_PY],
>     [AT_SETUP([$1])
> -   AT_SKIP_IF([test $HAVE_PYTHON2 = no])
>      $6
>      AT_KEYWORDS([ovsdb positive Python $4])
>      AT_CHECK([$PYTHON2 $srcdir/test-ovsdb.py $2], [0], [$3
> @@ -57,7 +56,6 @@ m4_define([OVSDB_CHECK_POSITIVE_PY],
>   # TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
>   m4_define([OVSDB_CHECK_POSITIVE_PY3],
>     [AT_SETUP([$1])
> -   AT_SKIP_IF([test $HAVE_PYTHON3 = no])
>      $6
>      AT_KEYWORDS([ovsdb positive Python $4])
>      AT_CHECK([$PYTHON3 $srcdir/test-ovsdb.py $2], [0], [$3
> @@ -100,7 +98,6 @@ m4_define([OVSDB_CHECK_NEGATIVE],
>   # TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
>   m4_define([OVSDB_CHECK_NEGATIVE_PY],
>     [AT_SETUP([$1])
> -   AT_SKIP_IF([test $HAVE_PYTHON2 = no])
>      AT_KEYWORDS([ovsdb negative $4])
>      AT_CHECK([$PYTHON2 $srcdir/test-ovsdb.py $2], [1], [], [stderr])
>      m4_assert(m4_len([$3]))
> @@ -121,7 +118,6 @@ m4_define([OVSDB_CHECK_NEGATIVE_PY],
>   # TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
>   m4_define([OVSDB_CHECK_NEGATIVE_PY],
>     [AT_SETUP([$1])
> -   AT_SKIP_IF([test $HAVE_PYTHON3 = no])
>      AT_KEYWORDS([ovsdb negative $4])
>      AT_CHECK([$PYTHON3 $srcdir/test-ovsdb.py $2], [1], [], [stderr])
>      m4_assert(m4_len([$3]))
> diff --git a/tests/system-kmod-macros.at b/tests/system-kmod-macros.at
> index 48e94642b..f494af5f5 100644
> --- a/tests/system-kmod-macros.at
> +++ b/tests/system-kmod-macros.at
> @@ -59,7 +59,6 @@ m4_define([CONFIGURE_VETH_OFFLOADS],
>   # kernel conntrack tables when the test is finished.
>   #
>   m4_define([CHECK_CONNTRACK],
> -    [AT_SKIP_IF([test $HAVE_PYTHON = no])
>        m4_foreach([mod], [[nf_conntrack_ipv4], [nf_conntrack_ipv6], [nf_nat_ftp],
>                           [nf_nat_tftp]],
>                   [modprobe mod || echo "Module mod not loaded."
> diff --git a/tests/system-userspace-macros.at b/tests/system-userspace-macros.at
> index 89735bf16..d8cc686c2 100644
> --- a/tests/system-userspace-macros.at
> +++ b/tests/system-userspace-macros.at
> @@ -63,7 +63,6 @@ m4_define([CONFIGURE_VETH_OFFLOADS],
>   # Perform requirements checks for running conntrack tests.
>   #
>   m4_define([CHECK_CONNTRACK],
> -    [AT_SKIP_IF([test $HAVE_PYTHON = no])]
>   )
>   
>   # CHECK_CONNTRACK_ALG()
> diff --git a/utilities/bugtool/automake.mk b/utilities/bugtool/automake.mk
> index b8c52d339..69b29e600 100644
> --- a/utilities/bugtool/automake.mk
> +++ b/utilities/bugtool/automake.mk
> @@ -1,4 +1,3 @@
> -if HAVE_PYTHON2
>   bugtool_plugins = \
>   	utilities/bugtool/plugins/network-status/ovn.xml
>   
> @@ -35,7 +34,6 @@ bugtool-uninstall-local:
>   	    rm -rf "$(DESTDIR)$(bugtoolpluginsdir)/$$dir"; \
>   	  fi \
>   	done; exit 0
> -endif
>   
>   EXTRA_DIST += \
>   	$(bugtool_plugins) \
> diff --git a/utilities/ovn-detrace.in b/utilities/ovn-detrace.in
> index c842adc32..f59544259 100755
> --- a/utilities/ovn-detrace.in
> +++ b/utilities/ovn-detrace.in
> @@ -1,4 +1,4 @@
> -#! @PYTHON@
> +#! @PYTHON3@
>   #
>   # Copyright (c) 2017 eBay Inc.
>   #
> diff --git a/utilities/ovn-docker-overlay-driver.in b/utilities/ovn-docker-overlay-driver.in
> index 65edfcd9d..f408bbdd8 100755
> --- a/utilities/ovn-docker-overlay-driver.in
> +++ b/utilities/ovn-docker-overlay-driver.in
> @@ -1,4 +1,4 @@
> -#! @PYTHON@
> +#! @PYTHON3@
>   # Copyright (C) 2015 Nicira, Inc.
>   #
>   # Licensed under the Apache License, Version 2.0 (the "License");
> diff --git a/utilities/ovn-docker-underlay-driver.in b/utilities/ovn-docker-underlay-driver.in
> index d91ce9fca..229418500 100755
> --- a/utilities/ovn-docker-underlay-driver.in
> +++ b/utilities/ovn-docker-underlay-driver.in
> @@ -1,4 +1,4 @@
> -#! @PYTHON@
> +#! @PYTHON3@
>   # Copyright (C) 2015 Nicira, Inc.
>   #
>   # Licensed under the Apache License, Version 2.0 (the "License");
>
Numan Siddique Nov. 12, 2019, 5:45 p.m. UTC | #2
On Tue, Nov 12, 2019 at 10:49 PM Mark Michelson <mmichels@redhat.com> wrote:
>
> Hi Numan,
>
> A couple of things:
>
> 1) It appears that configure will now fail if python3 is not found. Does
> this mean python is no longer optional when building?
I think so. To compile OVN we need to compile OVS and OVS fails anyway if
python3 is not present.

 If so, I think
> that needs to be reflected in the commit message. Also, if it's
> required, then I don't see the point of having the HAVE_PYTHON3 variable.

Sure. I will update the commit message and remove HAVE_PYTHON3 variable.

>
> 2) I think ovn-detrace requires some further changes. For instance, it
> uses the non-function version of "print". Dumitru is working on a change
> to ovn-detrace [1] that, as a side effect, is switching to using the
> print function instead. It's possible that if we get his change in
> first, then all you would need to do is to remove his "from future
> import print_function" line and things would just work.

Ok. I will take a look at ovn-detrace.

Thanks
Numan

>
> I'm not sure if there are other python2-isms present in ovn-detrace or
> other python utilities.
>
> On 11/12/19 11:31 AM, numans@ovn.org wrote:
> > From: Numan Siddique <numans@ovn.org>
> >
> > OVS removed the support for Python 2 in the commit [1].
> > And its time we do the same for OVN.
> >
> > This patch takes care of removing Python 2 references.
> >
> > [1] - 1ca0323e7c29("Require Python 3 and remove support for Python 2.")
> >
> > Signed-off-by: Numan Siddique <numans@ovn.org>
> > ---
> >   Makefile.am                             | 12 ++--
> >   automake.mk                             |  8 +--
> >   build-aux/dpdkstrip.py                  |  2 +-
> >   build-aux/sodepends.py                  |  2 +-
> >   build-aux/soexpand.py                   |  2 +-
> >   configure.ac                            |  2 -
> >   ipsec/ovs-monitor-ipsec.in              |  2 +-
> >   m4/ovn.m4                               | 89 ++-----------------------
> >   rhel/ovn-fedora.spec.in                 | 35 +---------
> >   tests/atlocal.in                        | 16 +----
> >   tests/checkpatch.at                     |  2 -
> >   tests/ovn-controller-vtep.at            |  1 -
> >   tests/ovn-northd.at                     | 10 ---
> >   tests/ovn.at                            | 62 -----------------
> >   tests/ovsdb-macros.at                   |  4 --
> >   tests/system-kmod-macros.at             |  1 -
> >   tests/system-userspace-macros.at        |  1 -
> >   utilities/bugtool/automake.mk           |  2 -
> >   utilities/ovn-detrace.in                |  2 +-
> >   utilities/ovn-docker-overlay-driver.in  |  2 +-
> >   utilities/ovn-docker-underlay-driver.in |  2 +-
> >   21 files changed, 28 insertions(+), 231 deletions(-)
> >
> > diff --git a/Makefile.am b/Makefile.am
> > index 1e41e49ea..8eed7a72b 100644
> > --- a/Makefile.am
> > +++ b/Makefile.am
> > @@ -71,7 +71,7 @@ endif
> >   # foo/__init__.pyc will cause Python to ignore foo.py.
> >   run_python = \
> >       PYTHONPATH=$(OVS_SRCDIR)/python$(psep)$$PYTHONPATH \
> > -     PYTHONDONTWRITEBYTECODE=yes $(PYTHON)
> > +     PYTHONDONTWRITEBYTECODE=yes $(PYTHON3)
> >
> >   ALL_LOCAL =
> >   BUILT_SOURCES =
> > @@ -165,13 +165,13 @@ ro_shell = printf '\043 Generated automatically -- do not modify!    -*- buffer-
> >
> >   SUFFIXES += .in
> >   .in:
> > -     $(AM_V_GEN)PYTHONPATH=$(OVS_SRCDIR)/python$(psep)$$PYTHONPATH$(psep)$(srcdir)/python $(PYTHON) $(srcdir)/build-aux/soexpand.py -I$(srcdir) -I$(OVS_SRCDIR) < $< | \
> > -       $(PYTHON) $(srcdir)/build-aux/dpdkstrip.py $(DPDKSTRIP_FLAGS) | \
> > +     $(AM_V_GEN)PYTHONPATH=$(OVS_SRCDIR)/python$(psep)$$PYTHONPATH$(psep)$(srcdir)/python $(PYTHON3) $(srcdir)/build-aux/soexpand.py -I$(srcdir) -I$(OVS_SRCDIR) < $< | \
> > +       $(PYTHON3) $(srcdir)/build-aux/dpdkstrip.py $(DPDKSTRIP_FLAGS) | \
> >         sed \
> >           -e 's,[@]PKIDIR[@],$(PKIDIR),g' \
> >           -e 's,[@]LOGDIR[@],$(LOGDIR),g' \
> >           -e 's,[@]DBDIR[@],$(DBDIR),g' \
> > -         -e 's,[@]PYTHON[@],$(PYTHON),g' \
> > +         -e 's,[@]PYTHON3[@],$(PYTHON3),g' \
> >           -e 's,[@]OVN_RUNDIR[@],$(OVN_RUNDIR),g' \
> >           -e 's,[@]OVSBUILDDIR[@],$(OVSBUILDDIR),g' \
> >           -e 's,[@]VERSION[@],$(VERSION),g' \
> > @@ -197,7 +197,7 @@ SUFFIXES += .xml
> >         PKIDIR='$(PKIDIR)' \
> >         LOGDIR='$(LOGDIR)' \
> >         DBDIR='$(DBDIR)' \
> > -       PYTHON='$(PYTHON)' \
> > +       PYTHON3='$(PYTHON3)' \
> >         RUNDIR='$(RUNDIR)' \
> >         OVN_RUNDIR='$(OVN_RUNDIR)' \
> >         VERSION='$(VERSION)' \
> > @@ -425,7 +425,7 @@ CLEANFILES += flake8-check
> >
> >   include $(srcdir)/manpages.mk
> >   $(srcdir)/manpages.mk: $(MAN_ROOTS) build-aux/sodepends.py $(OVS_SRCDIR)/python/build/soutil.py
> > -     @PYTHONPATH=$(OVS_SRCDIR)/python$(psep)$$PYTHONPATH$(psep)$(srcdir)/python $(PYTHON) $(srcdir)/build-aux/sodepends.py -I. -I$(srcdir) -I$(OVS_MANDIR) $(MAN_ROOTS) >$(@F).tmp
> > +     @PYTHONPATH=$(OVS_SRCDIR)/python$(psep)$$PYTHONPATH$(psep)$(srcdir)/python $(PYTHON3) $(srcdir)/build-aux/sodepends.py -I. -I$(srcdir) -I$(OVS_MANDIR) $(MAN_ROOTS) >$(@F).tmp
> >       @if cmp -s $(@F).tmp $@; then \
> >         touch $@; \
> >         rm -f $(@F).tmp; \
> > diff --git a/automake.mk b/automake.mk
> > index ad801f1e5..591e00751 100644
> > --- a/automake.mk
> > +++ b/automake.mk
> > @@ -6,19 +6,17 @@ CLEANFILES += ovn-architecture.7
> >   #
> >   # If "python" or "dot" is not available, then we do not add graphical diagram
> >   # to the documentation.
> > -if HAVE_PYTHON
> >   if HAVE_DOT
> >   OVSDB_DOT = $(run_python) ${OVSDIR}/ovsdb/ovsdb-dot.in
> >   ovn-nb.gv: ${OVSDIR}/ovsdb/ovsdb-dot.in $(srcdir)/ovn-nb.ovsschema
> >       $(AM_V_GEN)$(OVSDB_DOT) --no-arrows $(srcdir)/ovn-nb.ovsschema > $@
> >   ovn-nb.pic: ovn-nb.gv ${OVSDIR}/ovsdb/dot2pic
> > -     $(AM_V_GEN)(dot -T plain < ovn-nb.gv | $(PYTHON) ${OVSDIR}/ovsdb/dot2pic -f 3) > $@.tmp && \
> > +     $(AM_V_GEN)(dot -T plain < ovn-nb.gv | $(PYTHON3) ${OVSDIR}/ovsdb/dot2pic -f 3) > $@.tmp && \
> >       mv $@.tmp $@
> >   OVN_NB_PIC = ovn-nb.pic
> >   OVN_NB_DOT_DIAGRAM_ARG = --er-diagram=$(OVN_NB_PIC)
> >   CLEANFILES += ovn-nb.gv ovn-nb.pic
> >   endif
> > -endif
> >
> >   # OVN northbound schema documentation
> >   EXTRA_DIST += ovn-nb.xml
> > @@ -39,18 +37,16 @@ ovn-nb.5: \
> >   #
> >   # If "python" or "dot" is not available, then we do not add graphical diagram
> >   # to the documentation.
> > -if HAVE_PYTHON
> >   if HAVE_DOT
> >   ovn-sb.gv: ${OVSDIR}/ovsdb/ovsdb-dot.in $(srcdir)/ovn-sb.ovsschema
> >       $(AM_V_GEN)$(OVSDB_DOT) --no-arrows $(srcdir)/ovn-sb.ovsschema > $@
> >   ovn-sb.pic: ovn-sb.gv ${OVSDIR}/ovsdb/dot2pic
> > -     $(AM_V_GEN)(dot -T plain < ovn-sb.gv | $(PYTHON) ${OVSDIR}/ovsdb/dot2pic -f 3) > $@.tmp && \
> > +     $(AM_V_GEN)(dot -T plain < ovn-sb.gv | $(PYTHON3) ${OVSDIR}/ovsdb/dot2pic -f 3) > $@.tmp && \
> >       mv $@.tmp $@
> >   OVN_SB_PIC = ovn-sb.pic
> >   OVN_SB_DOT_DIAGRAM_ARG = --er-diagram=$(OVN_SB_PIC)
> >   CLEANFILES += ovn-sb.gv ovn-sb.pic
> >   endif
> > -endif
> >
> >   # OVN southbound schema documentation
> >   EXTRA_DIST += ovn-sb.xml
> > diff --git a/build-aux/dpdkstrip.py b/build-aux/dpdkstrip.py
> > index 48c7f0693..b8b8ba9c8 100755
> > --- a/build-aux/dpdkstrip.py
> > +++ b/build-aux/dpdkstrip.py
> > @@ -1,4 +1,4 @@
> > -#! /usr/bin/env python
> > +#! /usr/bin/env python3
> >   # Copyright (c) 2017 Red Hat, Inc.
> >   #
> >   # Licensed under the Apache License, Version 2.0 (the "License");
> > diff --git a/build-aux/sodepends.py b/build-aux/sodepends.py
> > index 90cfaa0f7..45812bcbd 100755
> > --- a/build-aux/sodepends.py
> > +++ b/build-aux/sodepends.py
> > @@ -1,4 +1,4 @@
> > -#! /usr/bin/env python
> > +#! /usr/bin/env python3
> >
> >   # Copyright (c) 2008, 2011, 2017 Nicira, Inc.
> >   #
> > diff --git a/build-aux/soexpand.py b/build-aux/soexpand.py
> > index 53ca64073..00adcf47a 100755
> > --- a/build-aux/soexpand.py
> > +++ b/build-aux/soexpand.py
> > @@ -1,4 +1,4 @@
> > -#! /usr/bin/env python
> > +#! /usr/bin/env python3
> >
> >   # Copyright (c) 2008, 2017 Nicira, Inc.
> >   #
> > diff --git a/configure.ac b/configure.ac
> > index 78498181c..9b29cbfe4 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -89,9 +89,7 @@ OVN_CHECK_COVERAGE
> >   OVS_CHECK_NDEBUG
> >   OVS_CHECK_OPENSSL
> >   OVN_CHECK_LOGDIR
> > -OVN_CHECK_PYTHON2
> >   OVN_CHECK_PYTHON3
> > -OVN_CHECK_PYTHON
> >   OVN_CHECK_FLAKE8
> >   OVN_CHECK_SPHINX
> >   OVN_CHECK_DOT
> > diff --git a/ipsec/ovs-monitor-ipsec.in b/ipsec/ovs-monitor-ipsec.in
> > index 4710be039..37e370324 100755
> > --- a/ipsec/ovs-monitor-ipsec.in
> > +++ b/ipsec/ovs-monitor-ipsec.in
> > @@ -1,4 +1,4 @@
> > -#! @PYTHON@
> > +#! @PYTHON3@
> >   # Copyright (c) 2017 Nicira, Inc.
> >   #
> >   # Licensed under the Apache License, Version 2.0 (the "License");
> > diff --git a/m4/ovn.m4 b/m4/ovn.m4
> > index 277468f7f..dacfabb2a 100644
> > --- a/m4/ovn.m4
> > +++ b/m4/ovn.m4
> > @@ -300,57 +300,16 @@ dnl Checks for valgrind/valgrind.h.
> >   AC_DEFUN([OVN_CHECK_VALGRIND],
> >     [AC_CHECK_HEADERS([valgrind/valgrind.h])])
> >
> > -dnl Checks for Python 2.x, x >= 7.
> > -AC_DEFUN([OVN_CHECK_PYTHON2],
> > -  [AC_CACHE_CHECK(
> > -     [for Python 2.x for x >= 7],
> > -     [ovs_cv_python2],
> > -     [if test -n "$PYTHON2"; then
> > -        ovs_cv_python2=$PYTHON2
> > -      else
> > -        ovs_cv_python2=no
> > -        for binary in python2 python2.7 python; do
> > -          ovs_save_IFS=$IFS; IFS=$PATH_SEPARATOR
> > -          for dir in $PATH; do
> > -            IFS=$ovs_save_IFS
> > -            test -z "$dir" && dir=.
> > -            if test -x "$dir"/"$binary" && "$dir"/"$binary" -c 'import sys
> > -if sys.hexversion >= 0x02070000 and sys.hexversion < 0x03000000:
> > -    sys.exit(0)
> > -else:
> > -    sys.exit(1)'; then
> > -              ovs_cv_python2=$dir/$binary
> > -              break 2
> > -            fi
> > -          done
> > -        done
> > -        if test "$ovs_cv_python2" != no && test -x "$ovs_cv_python2"; then
> > -          if ! "$ovs_cv_python2" -c 'import six ; six.moves.range' >&AS_MESSAGE_LOG_FD 2>&1; then
> > -            ovs_cv_python2=no
> > -            AC_MSG_WARN([Missing Python six library or version too old.])
> > -          fi
> > -        fi
> > -      fi])
> > -   AC_SUBST([HAVE_PYTHON2])
> > -   AM_MISSING_PROG([PYTHON2], [python2])
> > -   if test "$ovs_cv_python2" != no; then
> > -     PYTHON2=$ovs_cv_python2
> > -     HAVE_PYTHON2=yes
> > -   else
> > -     HAVE_PYTHON2=no
> > -   fi
> > -   AM_CONDITIONAL([HAVE_PYTHON2], [test "$HAVE_PYTHON2" = yes])])
> > -
> > -dnl Checks for Python 3.x, x >= 4.
> > +dnl Checks for Python 3.4 or later.
> >   AC_DEFUN([OVN_CHECK_PYTHON3],
> >     [AC_CACHE_CHECK(
> > -     [for Python 3.x for x >= 4],
> > +     [for Python 3 (version 3.4 or later)],
> >        [ovs_cv_python3],
> >        [if test -n "$PYTHON3"; then
> >           ovs_cv_python3=$PYTHON3
> >         else
> >           ovs_cv_python3=no
> > -        for binary in python3 python3.4; do
> > +        for binary in python3 python3.4 python3.5 python3.6 python3.7; do
> >             ovs_save_IFS=$IFS; IFS=$PATH_SEPARATOR
> >             for dir in $PATH; do
> >               IFS=$ovs_save_IFS
> > @@ -365,46 +324,12 @@ else:
> >               fi
> >             done
> >           done
> > -        if test "$ovs_cv_python3" != no; then
> > -          if test -x "$ovs_cv_python3" && ! "$ovs_cv_python3" -c 'import six' >/dev/null 2>&1; then
> > -            ovs_cv_python3=no
> > -            AC_MSG_WARN([Missing Python six library.])
> > -          fi
> > -        fi
> >         fi])
> > -   AC_SUBST([HAVE_PYTHON3])
> > -   AM_MISSING_PROG([PYTHON3], [python3])
> > -   if test "$ovs_cv_python3" != no; then
> > -     PYTHON3=$ovs_cv_python3
> > -     HAVE_PYTHON3=yes
> > -   else
> > -     HAVE_PYTHON3=no
> > +   if test "$ovs_cv_python3" = no; then
> > +     AC_MSG_ERROR([Python 3.4 or later is required but not found in $PATH, please install it or set $PYTHON3 to point to it])
> >      fi
> > -   AM_CONDITIONAL([HAVE_PYTHON3], [test "$HAVE_PYTHON3" = yes])])
> > -
> > -dnl Checks if you have any compatible Python version installed.
> > -dnl Python 2.7+ has the preference to 3.4+
> > -AC_DEFUN([OVN_CHECK_PYTHON],
> > -  [AC_CACHE_CHECK(
> > -     [for Python 2 or 3],
> > -     [ovs_cv_python],
> > -     [if test -n "$PYTHON"; then
> > -        ovs_cv_python=$PYTHON
> > -      else
> > -        ovs_cv_python=no
> > -        if test "$ovs_cv_python2" != no; then
> > -          ovs_cv_python=$ovs_cv_python2
> > -        elif test "$ovs_cv_python3" != no; then
> > -          ovs_cv_python=$ovs_cv_python3
> > -        else
> > -          AC_MSG_ERROR([Missing Python.])
> > -        fi
> > -      fi])
> > -    AC_SUBST([PYTHON])
> > -    PYTHON=$ovs_cv_python
> > -    AC_SUBST([HAVE_PYTHON])
> > -    HAVE_PYTHON=yes
> > -    AM_CONDITIONAL([HAVE_PYTHON], [test "$HAVE_PYTHON" = yes])])
> > +   AC_ARG_VAR([PYTHON3])
> > +   PYTHON3=$ovs_cv_python3])
> >
> >   dnl Checks for flake8.
> >   AC_DEFUN([OVN_CHECK_FLAKE8],
> > diff --git a/rhel/ovn-fedora.spec.in b/rhel/ovn-fedora.spec.in
> > index 447b4fe6e..acde99793 100644
> > --- a/rhel/ovn-fedora.spec.in
> > +++ b/rhel/ovn-fedora.spec.in
> > @@ -16,11 +16,6 @@
> >   # as regular user, specify the '--without libcapng'
> >   %bcond_without libcapng
> >
> > -# 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
> > -
> >   # Enable PIE, bz#955181
> >   %global _hardened_build 1
> >
> > @@ -30,16 +25,6 @@
> >   %define _rundir /run
> >   %endif
> >
> > -# define the python package prefix based on distribution version so that we can
> > -# simultaneously support RHEL-based and later Fedora versions in this spec file.
> > -%if 0%{?fedora} >= 25
> > -%define _py2 python2
> > -%endif
> > -
> > -%if 0%{?rhel} || 0%{?fedora} < 25
> > -%define _py2 python
> > -%endif
> > -
> >   Name: ovn
> >   Summary: Open Virtual Network support
> >   Group: System Environment/Daemons
> > @@ -61,16 +46,12 @@ Source10: http://openvswitch.org/releases/openvswitch-%{ovsver}.tar.gz
> >   BuildRequires: gcc gcc-c++
> >   BuildRequires: autoconf automake libtool
> >   BuildRequires: systemd-units openssl openssl-devel
> > -BuildRequires: %{_py2}-devel
> > -%if 0%{?fedora} > 22 || %{with build_python3}
> >   BuildRequires: python3-devel
> > -%endif
> >   BuildRequires: desktop-file-utils
> >   BuildRequires: groff graphviz
> >   BuildRequires: checkpolicy, selinux-policy-devel
> >   BuildRequires: /usr/bin/sphinx-build
> >   # make check dependencies
> > -BuildRequires: %{_py2}-twisted%{?rhel:-core} %{_py2}-zope-interface %{_py2}-six
> >   BuildRequires: procps-ng
> >   %if %{with libcapng}
> >   BuildRequires: libcap-ng libcap-ng-devel
> > @@ -127,7 +108,7 @@ OVN vtep controller
> >   %package docker
> >   Summary: Open Virtual Network support
> >   License: ASL 2.0
> > -Requires: ovn %{_py2}-openvswitch
> > +Requires: ovn python3-openvswitch
> >   Obsoletes: openvswitch-ovn-docker
> >   Provides: openvswitch-ovn-docker = %{?epoch:%{epoch}:}%{version}-%{release}
> >
> > @@ -153,12 +134,7 @@ cd openvswitch-%{ovsver}
> >   %endif
> >           --enable-ssl \
> >           --with-pkidir=%{_sharedstatedir}/openvswitch/pki \
> > -%if 0%{?fedora} > 22 || %{with build_python3}
> > -        PYTHON3=%{__python3} \
> > -        PYTHON=%{__python2}
> > -%else
> > -        PYTHON=%{__python}
> > -%endif
> > +        PYTHON3=%{__python3}
> >
> >   make %{?_smp_mflags}
> >   cd -
> > @@ -173,12 +149,7 @@ cd -
> >   %endif
> >           --enable-ssl \
> >           --with-pkidir=%{_sharedstatedir}/openvswitch/pki \
> > -%if 0%{?fedora} > 22 || %{with build_python3}
> > -        PYTHON3=%{__python3} \
> > -        PYTHON=%{__python2}
> > -%else
> > -        PYTHON=%{__python}
> > -%endif
> > +        PYTHON3=%{__python3}
> >
> >   make %{?_smp_mflags}
> >
> > diff --git a/tests/atlocal.in b/tests/atlocal.in
> > index f79473583..6976518ce 100644
> > --- a/tests/atlocal.in
> > +++ b/tests/atlocal.in
> > @@ -1,23 +1,13 @@
> >   # -*- shell-script -*-
> >   HAVE_OPENSSL='@HAVE_OPENSSL@'
> >   OPENSSL_SUPPORTS_SNI='@OPENSSL_SUPPORTS_SNI@'
> > -HAVE_PYTHON='@HAVE_PYTHON@'
> > -HAVE_PYTHON2='@HAVE_PYTHON2@'
> >   HAVE_PYTHON3='@HAVE_PYTHON3@'
> >   HAVE_UNBOUND='@HAVE_UNBOUND@'
> >   EGREP='@EGREP@'
> >
> > -if test x"$PYTHON" = x; then
> > -    PYTHON='@PYTHON@'
> > -fi
> > -
> > -if test x"$PYTHON2" = x; then
> > -    PYTHON2='@PYTHON2@'
> > -fi
> > -
> >   if test x"$PYTHON3" = x; then
> >       PYTHON3='@PYTHON3@'
> > -
> > +    PYTHON='@PYTHON3@'
> >       # PYTHONCOERCECLOCALE=0 disables the Unicode compatibility warning on
> >       # stderr that breaks almost any Python3 test (PEP 0538)
> >       PYTHONCOERCECLOCALE=0
> > @@ -149,8 +139,8 @@ find_l7_lib()
> >   {
> >       set +x
> >       var=HAVE_`echo "$1" | tr '[a-z]' '[A-Z]'`
> > -    if test "$HAVE_PYTHON" = "yes"; then
> > -        result=$($PYTHON $abs_top_srcdir/tests/test-l7.py --help | grep "$1")
> > +    if test "$HAVE_PYTHON3" = "yes"; then
> > +        result=$($PYTHON3 $abs_top_srcdir/tests/test-l7.py --help | grep "$1")
> >           if test "x${result}" != x; then
> >               eval ${var}="yes"
> >           else
> > diff --git a/tests/checkpatch.at b/tests/checkpatch.at
> > index fe21acdf2..caf772884 100755
> > --- a/tests/checkpatch.at
> > +++ b/tests/checkpatch.at
> > @@ -6,7 +6,6 @@ OVS_START_SHELL_HELPERS
> >   # Runs checkpatch under Python 2 and Python 3, if installed, on the given
> >   # PATCH, expecting the specified set of ERRORS (and warnings).
> >   try_checkpatch() {
> > -    AT_SKIP_IF([test $HAVE_PYTHON2 = no && test $HAVE_PYTHON3 = no])
> >       # Take the patch to test from $1.  Remove an initial four-space indent
> >       # from it and, if it is just headers with no body, add a null body.
> >       echo "$1" | sed 's/^    //' > test.patch
> > @@ -22,7 +21,6 @@ try_checkpatch() {
> >           : > expout
> >       fi
> >
> > -    try_checkpatch__ "$HAVE_PYTHON2" "$PYTHON2"
> >       try_checkpatch__ "$HAVE_PYTHON3" "$PYTHON3"
> >   }
> >   try_checkpatch__() {
> > diff --git a/tests/ovn-controller-vtep.at b/tests/ovn-controller-vtep.at
> > index d4744d76e..3092dd5ca 100644
> > --- a/tests/ovn-controller-vtep.at
> > +++ b/tests/ovn-controller-vtep.at
> > @@ -15,7 +15,6 @@ m4_define([OVN_CONTROLLER_VTEP_START],
> >     [
> >      AT_KEYWORDS([ovn])
> >      # this will cause skip when 'make check' using Windows setup.
> > -   AT_SKIP_IF([test $HAVE_PYTHON = no])
> >
> >      dnl Create databases (ovn-nb, ovn-sb, vtep).
> >      AT_CHECK([ovsdb-tool create vswitchd.db $ovs_srcdir/vswitchd/vswitch.ovsschema])
> > diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at
> > index 989ed4f47..12597d3ad 100644
> > --- a/tests/ovn-northd.at
> > +++ b/tests/ovn-northd.at
> > @@ -1,6 +1,5 @@
> >   AT_BANNER([OVN northd])
> >   AT_SETUP([ovn -- check   from NBDB to SBDB])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   ovn-nbctl create Logical_Router name=R1
> > @@ -151,7 +150,6 @@ AT_CHECK([ovn-sbctl list ha_chassis_group | wc -l], [0], [0
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- check Gateway_Chassis propagation from NBDB to SBDB backwards compatibility])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   ovn-nbctl create Logical_Router name=R1
> > @@ -200,7 +198,6 @@ AT_CHECK([ovn-sbctl list ha_chassis_group | wc -l], [0], [0
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- check up state of VIF LSP])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   ovn-nbctl ls-add S1
> > @@ -214,7 +211,6 @@ AT_CHECK([test x`ovn-nbctl lsp-get-up S1-vm1` = xup])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- check up state of router LSP linked to a distributed LR])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   ovn-nbctl lr-add R1
> > @@ -230,7 +226,6 @@ AT_CHECK([test x`ovn-nbctl lsp-get-up S1-R1` = xup])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- check up state of router LSP linked to a gateway LR])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   ovn-sbctl chassis-add gw1 geneve 127.0.0.1
> > @@ -250,7 +245,6 @@ AT_CHECK([test x`ovn-nbctl lsp-get-up S1-R1` = xup])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- check up state of router LSP linked to an LRP with set Gateway Chassis])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   ovn-sbctl chassis-add gw1 geneve 127.0.0.1
> > @@ -418,7 +412,6 @@ OVS_APP_EXIT_AND_WAIT([ovn-northd])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- check HA_Chassis_Group propagation from NBDB to SBDB])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   ovn-nbctl --wait=sb ha-chassis-group-add hagrp1
> > @@ -900,7 +893,6 @@ OVS_APP_EXIT_AND_WAIT([ovn-northd])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- ovn-northd pause and resume])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   AT_CHECK([test xfalse = x`as northd ovs-appctl -t ovn-northd is-paused`])
> > @@ -938,7 +930,6 @@ OVS_WAIT_UNTIL([
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- check Redirect Chassis propagation from NB to SB])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   ovn-sbctl chassis-add gw1 geneve 127.0.0.1
> > @@ -968,7 +959,6 @@ OVS_WAIT_UNTIL([ovn-sbctl get Port_Binding ${uuid} options:redirect-type], [0],
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- check stateless dnat_and_snat rule])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   ovn-sbctl chassis-add gw1 geneve 127.0.0.1
> > diff --git a/tests/ovn.at b/tests/ovn.at
> > index 5fc2de2d3..efa89849e 100644
> > --- a/tests/ovn.at
> > +++ b/tests/ovn.at
> > @@ -1490,7 +1490,6 @@ AT_BANNER([OVN end-to-end tests])
> >   # 3 hypervisors, one logical switch, 3 logical ports per hypervisor
> >   AT_SETUP([ovn -- 3 HVs, 1 LS, 3 lports/HV])
> >   AT_KEYWORDS([ovnarp])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   # Create hypervisors hv[123].
> > @@ -1785,7 +1784,6 @@ AT_CLEANUP
> >   # logical ports bound to chassis encap-ip.
> >   AT_SETUP([ovn -- 2 HVs, 1 LS, 2 lports/HV])
> >   AT_KEYWORDS([ovnarp])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   # Create hypervisors hv[12].
> > @@ -1962,7 +1960,6 @@ OVN_CLEANUP([hv1],[hv2])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- trace 1 LS, 3 LSPs])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   # Create a logical switch and some logical ports.
> > @@ -2185,7 +2182,6 @@ AT_CLEANUP
> >   # 2 locally attached networks (one flat, one vlan tagged over same device)
> >   # 2 ports per HV on each network
> >   AT_SETUP([ovn -- 2 HVs, 4 lports/HV, localnet ports])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   # In this test cases we create 3 switches, all connected to same
> > @@ -2379,7 +2375,6 @@ AT_CLEANUP
> >
> >   AT_SETUP([ovn -- vtep: 3 HVs, 1 VIFs/HV, 1 GW, 1 LS])
> >   AT_KEYWORDS([vtep])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   # Configure the Northbound database
> > @@ -2581,7 +2576,6 @@ AT_CLEANUP
> >
> >   # Similar test to "hardware GW"
> >   AT_SETUP([ovn -- 3 HVs, 1 VIFs/HV, 1 software GW, 1 LS])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   # Configure the Northbound database
> > @@ -2730,7 +2724,6 @@ AT_CLEANUP
> >
> >   # 3 hypervisors, 3 logical switches with 3 logical ports each, 1 logical router
> >   AT_SETUP([ovn -- 3 HVs, 3 LS, 3 lports/LS, 1 LR])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   # Logical network:
> > @@ -3139,7 +3132,6 @@ OVN_CLEANUP([hv1], [hv2], [hv3])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- IP relocation using GARP request])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   # Logical network:
> > @@ -3342,7 +3334,6 @@ AT_CLEANUP
> >
> >   # 3 hypervisors, one logical switch, 3 logical ports per hypervisor
> >   AT_SETUP([ovn -- portsecurity : 3 HVs, 1 LS, 3 lports/HV])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   # Create hypervisors hv[123].
> > @@ -3719,7 +3710,6 @@ OVN_CLEANUP([hv1],[hv2],[hv3])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- 2 HVs, 2 LS, 1 lport/LS, 2 peer LRs])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   # Logical network:
> > @@ -3866,7 +3856,6 @@ AT_CLEANUP
> >
> >   AT_SETUP([ovn -- 1 HV, 1 LS, 2 lport/LS, 1 LR])
> >   AT_KEYWORDS([router-admin-state])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   # Logical network:
> > @@ -3978,7 +3967,6 @@ AT_CLEANUP
> >
> >   AT_SETUP([ovn -- 1 HV, 2 LSs, 1 lport/LS, 1 LR])
> >   AT_KEYWORDS([router-admin-state])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   # Logical network:
> > @@ -4093,7 +4081,6 @@ OVN_CLEANUP([hv1])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- 2 HVs, 3 LS, 1 lport/LS, 2 peer LRs, static routes])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   # Logical network:
> > @@ -4246,7 +4233,6 @@ OVN_CLEANUP([hv1],[hv2])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- send gratuitous arp on localnet])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >   ovn-nbctl ls-add lsw0
> >   net_add n1
> > @@ -4300,7 +4286,6 @@ OVN_CLEANUP([hv])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- 2 HVs, 3 LRs connected via LS, static routes])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   # Logical network:
> > @@ -4477,7 +4462,6 @@ OVN_CLEANUP([hv1],[hv2])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- dhcpv4 : 1 HV, 2 LS, 2 LSPs/LS])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   ovn-nbctl ls-add ls1
> > @@ -4910,7 +4894,6 @@ OVN_CLEANUP([hv1])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- dhcpv6 : 1 HV, 2 LS, 5 LSPs])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   ovn-nbctl ls-add ls1
> > @@ -5182,7 +5165,6 @@ OVN_CLEANUP([hv1])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- 2 HVs, 2 LRs connected via LS, gateway router])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   # Logical network:
> > @@ -5359,7 +5341,6 @@ AT_CLEANUP
> >
> >   AT_SETUP([ovn -- icmp_reply: 1 HVs, 2 LSs, 1 lport/LS, 1 LR])
> >   AT_KEYWORDS([router-icmp-reply])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   # Logical network:
> > @@ -5505,7 +5486,6 @@ AT_CLEANUP
> >
> >   AT_SETUP([ovn -- policy-based routing: 1 HVs, 2 LSs, 1 lport/LS, 1 LR])
> >   AT_KEYWORDS([policy-based-routing])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   # Logical network:
> > @@ -5691,7 +5671,6 @@ AT_CLEANUP
> >
> >   AT_SETUP([ovn -- policy-based routing IPv6: 1 HVs, 3 LSs, 1 lport/LS, 1 LR])
> >   AT_KEYWORDS([policy-based-routing])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   # Logical network:
> > @@ -5968,7 +5947,6 @@ OVN_CLEANUP([hv1])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- nd_na ])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   #TODO: since patch port for IPv6 logical router port is not ready not,
> > @@ -6067,7 +6045,6 @@ OVN_CLEANUP([hv1])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- ipam])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   # Add a port to a switch that does not have a subnet set, then set the
> > @@ -6479,7 +6456,6 @@ OVS_APP_EXIT_AND_WAIT([ovn-northd])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- ipam connectivity])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   ovn-nbctl lr-add R1
> > @@ -6609,7 +6585,6 @@ AT_CLEANUP
> >
> >   AT_SETUP([ovn -- ovs-vswitchd restart])
> >   AT_KEYWORDS([vswitchd])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   ovn-nbctl ls-add ls1
> > @@ -6703,7 +6678,6 @@ OVN_CLEANUP([hv1])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- send arp for nexthop])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   # Topology: Two LSs - ls1 and ls2 are connected via router r0
> > @@ -6813,7 +6787,6 @@ OVN_CLEANUP([hv1])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- send gratuitous arp for nat ips in localnet])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >   # Create logical switch
> >   ovn-nbctl ls-add ls0
> > @@ -6865,7 +6838,6 @@ OVN_CLEANUP([hv1])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- send gratuitous arp with nat-addresses router in localnet])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >   # Create logical switch
> >   ovn-nbctl ls-add ls0
> > @@ -6963,7 +6935,6 @@ OVN_CLEANUP([hv1])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- conntrack zone allocation])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   # Logical network:
> > @@ -7517,7 +7488,6 @@ OVN_CLEANUP([hv])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- read-only sb db:ptcp access])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >
> >   : > .$1.db.~lock~
> >   ovsdb-tool create ovn-sb.db "$abs_top_srcdir"/ovn-sb.ovsschema
> > @@ -7553,7 +7523,6 @@ OVS_APP_EXIT_AND_WAIT([ovsdb-server])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- read-only sb db:pssl access])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   AT_SKIP_IF([test "$HAVE_OPENSSL" = no])
> >   PKIDIR="$(cd $abs_top_builddir/tests && pwd)"
> >   AT_SKIP_IF([expr "$PKIDIR" : ".*[   '\"
> > @@ -7610,7 +7579,6 @@ OVS_APP_EXIT_AND_WAIT([ovsdb-server])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- nb connection/ssl commands])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   AT_SKIP_IF([test "$HAVE_OPENSSL" = no])
> >   PKIDIR="$(cd $abs_top_builddir/tests && pwd)"
> >   AT_SKIP_IF([expr "$PKIDIR" : ".*[   '\"
> > @@ -7662,7 +7630,6 @@ OVS_APP_EXIT_AND_WAIT([ovsdb-server])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- sb connection/ssl commands])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   AT_SKIP_IF([test "$HAVE_OPENSSL" = no])
> >   PKIDIR="$(cd $abs_top_builddir/tests && pwd)"
> >   AT_SKIP_IF([expr "$PKIDIR" : ".*[   '\"
> > @@ -7919,7 +7886,6 @@ OVN_CLEANUP([hv1],[hv2])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- 3 HVs, 3 LRs connected via LS, source IP based routes])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   # Logical network:
> > @@ -8120,7 +8086,6 @@ OVN_CLEANUP([hv1],[hv2],[hv3])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- dns lookup : 1 HV, 2 LS, 2 LSPs/LS])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   ovn-nbctl ls-add ls1
> > @@ -8534,7 +8499,6 @@ OVN_CLEANUP([hv1])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- 4 HV, 1 LS, 1 LR, packet test with HA distributed router gateway port])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   net_add n1
> > @@ -8761,7 +8725,6 @@ OVN_CLEANUP([hv1],[gw1],[ext1])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- 4 HV, 3 LS, 2 LR, packet test with HA distributed router gateway port])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   net_add n1
> > @@ -8980,7 +8943,6 @@ OVN_CLEANUP([hv1],[gw1],[gw2],[ext1])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- 1 LR with distributed router gateway port])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   # Logical network:
> > @@ -9308,7 +9270,6 @@ OVN_CLEANUP([hv1],[hv2],[hv3])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- send gratuitous arp for NAT rules on distributed router])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >   # Create logical switches
> >   ovn-nbctl ls-add ls0
> > @@ -9450,7 +9411,6 @@ AT_CLEANUP
> >   # gateway port should use vlans(i.e input network vlan tag) across hypervisors
> >   # instead of tunneling.
> >   AT_SETUP([ovn -- vlan traffic for external network with distributed router gateway port])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   # Logical network:
> > @@ -9769,7 +9729,6 @@ AT_CLEANUP
> >
> >   AT_SETUP([ovn -- IPv6 ND Router Solicitation responder])
> >   AT_KEYWORDS([ovn-nd_ra])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   # In this test case we create 1 lswitch with 3 VIF ports attached,
> > @@ -10017,7 +9976,6 @@ OVN_CLEANUP([hv1])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- /32 router IP address])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   # Logical network:
> > @@ -10115,7 +10073,6 @@ OVN_CLEANUP([hv1],[hv2])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- 2 HVs, 1 lport/HV, localport ports])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   ovn-nbctl ls-add ls1
> > @@ -10237,7 +10194,6 @@ OVN_CLEANUP([hv1],[hv2])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- 1 LR with HA distributed router gateway port])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   net_add n1
> > @@ -10792,7 +10748,6 @@ OVN_CLEANUP([gw1],[gw2],[hv1],[hv2])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- send gratuitous ARP for NAT rules on HA distributed router])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >   ovn-nbctl ls-add ls0
> >   ovn-nbctl ls-add ls1
> > @@ -10963,7 +10918,6 @@ OVN_CLEANUP([hv1],[hv2],[hv3])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- ensure one gw controller restart in HA doesn't bounce the master])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   net_add n1
> > @@ -11060,7 +11014,6 @@ AT_CLEANUP
> >
> >   AT_SETUP([ovn -- IPv6 Neighbor Solicitation for unknown MAC])
> >   AT_KEYWORDS([ovn-nd_ns for unknown mac])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   ovn-nbctl ls-add sw0_ip6
> > @@ -11523,7 +11476,6 @@ AT_CLEANUP
> >
> >   AT_SETUP([ovn -- ACL reject rule test])
> >   AT_KEYWORDS([acl-reject])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   # test_ip_packet INPORT HV ETH_SRC ETH_DST IPV4_SRC IPV4_DST IP_CHKSUM EXP_IP_CHKSUM EXP_ICMP_CHKSUM
> > @@ -11665,7 +11617,6 @@ AT_CLEANUP
> >
> >   AT_SETUP([ovn -- Port Groups])
> >   AT_KEYWORDS([ovnpg])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   # Logical network:
> > @@ -11891,7 +11842,6 @@ AT_CLEANUP
> >
> >   AT_SETUP([ovn -- ACLs on Port Groups])
> >   AT_KEYWORDS([ovnpg_acl])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   # Logical network:
> > @@ -12377,7 +12327,6 @@ AT_CLEANUP
> >
> >   AT_SETUP([ovn -- TTL exceeded])
> >   AT_KEYWORDS([ttl-exceeded])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   # test_ip_packet INPORT HV ETH_SRC ETH_DST IPV4_SRC IPV4_DST IPV4_ROUTER IP_CHKSUM EXP_IP_CHKSUM EXP_ICMP_CHKSUM
> > @@ -12474,7 +12423,6 @@ AT_CLEANUP
> >
> >   AT_SETUP([ovn -- router port unreachable])
> >   AT_KEYWORDS([router-port-unreachable])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   # test_ip_packet INPORT HV ETH_SRC ETH_DST IPV4_SRC IPV4_ROUTER L4_PROTCOL IP_CHKSUM EXP_IP_CHKSUM EXP_ICMP_CHKSUM EXP_ICMP_CODE
> > @@ -12623,7 +12571,6 @@ OVN_CLEANUP([hv1], [hv2])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- ovn-controller exit])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >   # Logical network:
> >   # One Logical Router: ro, with two logical switches sw1 and sw2.
> > @@ -12714,7 +12661,6 @@ OVN_CLEANUP([hv1],[hv2])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- external logical port])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   net_add n1
> > @@ -13450,7 +13396,6 @@ AT_CLEANUP
> >
> >   AT_SETUP([ovn -- Address Set Incremental Processing])
> >   AT_KEYWORDS([ovn_as_inc])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   net_add n1
> > @@ -13524,7 +13469,6 @@ OVN_CLEANUP([hv1])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- ovn-controller restart])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   # Logical network:
> > @@ -13677,7 +13621,6 @@ AT_CLEANUP
> >
> >   AT_SETUP([ovn -- router - check packet length - icmp defrag])
> >   AT_KEYWORDS([check packet length])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   ovn-nbctl ls-add sw0
> > @@ -13852,7 +13795,6 @@ AT_CLEANUP
> >
> >   AT_SETUP([ovn -- IP packet buffering])
> >   AT_KEYWORDS([ip-buffering])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   # Logical network:
> > @@ -13997,7 +13939,6 @@ OVN_CLEANUP([hv1],[hv2])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- neighbor update on same HV])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   # Logical network:
> > @@ -14507,7 +14448,6 @@ AT_CLEANUP
> >
> >   AT_SETUP([ovn -- virtual ports])
> >   AT_KEYWORDS([virtual ports])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   send_garp() {
> > @@ -14932,7 +14872,6 @@ OVN_CLEANUP([hv1], [hv2])
> >   AT_CLEANUP
> >
> >   AT_SETUP([ovn -- IGMP snoop/querier/relay])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   # Logical network:
> > @@ -16112,7 +16051,6 @@ AT_CLEANUP
> >
> >   AT_SETUP([ovn -- ARP lookup before learning])
> >   AT_KEYWORDS([virtual ports])
> > -AT_SKIP_IF([test $HAVE_PYTHON = no])
> >   ovn_start
> >
> >   send_garp() {
> > diff --git a/tests/ovsdb-macros.at b/tests/ovsdb-macros.at
> > index 83e3df750..7664a53cd 100644
> > --- a/tests/ovsdb-macros.at
> > +++ b/tests/ovsdb-macros.at
> > @@ -38,7 +38,6 @@ m4_define([OVSDB_CHECK_POSITIVE],
> >   # TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
> >   m4_define([OVSDB_CHECK_POSITIVE_PY],
> >     [AT_SETUP([$1])
> > -   AT_SKIP_IF([test $HAVE_PYTHON2 = no])
> >      $6
> >      AT_KEYWORDS([ovsdb positive Python $4])
> >      AT_CHECK([$PYTHON2 $srcdir/test-ovsdb.py $2], [0], [$3
> > @@ -57,7 +56,6 @@ m4_define([OVSDB_CHECK_POSITIVE_PY],
> >   # TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
> >   m4_define([OVSDB_CHECK_POSITIVE_PY3],
> >     [AT_SETUP([$1])
> > -   AT_SKIP_IF([test $HAVE_PYTHON3 = no])
> >      $6
> >      AT_KEYWORDS([ovsdb positive Python $4])
> >      AT_CHECK([$PYTHON3 $srcdir/test-ovsdb.py $2], [0], [$3
> > @@ -100,7 +98,6 @@ m4_define([OVSDB_CHECK_NEGATIVE],
> >   # TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
> >   m4_define([OVSDB_CHECK_NEGATIVE_PY],
> >     [AT_SETUP([$1])
> > -   AT_SKIP_IF([test $HAVE_PYTHON2 = no])
> >      AT_KEYWORDS([ovsdb negative $4])
> >      AT_CHECK([$PYTHON2 $srcdir/test-ovsdb.py $2], [1], [], [stderr])
> >      m4_assert(m4_len([$3]))
> > @@ -121,7 +118,6 @@ m4_define([OVSDB_CHECK_NEGATIVE_PY],
> >   # TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
> >   m4_define([OVSDB_CHECK_NEGATIVE_PY],
> >     [AT_SETUP([$1])
> > -   AT_SKIP_IF([test $HAVE_PYTHON3 = no])
> >      AT_KEYWORDS([ovsdb negative $4])
> >      AT_CHECK([$PYTHON3 $srcdir/test-ovsdb.py $2], [1], [], [stderr])
> >      m4_assert(m4_len([$3]))
> > diff --git a/tests/system-kmod-macros.at b/tests/system-kmod-macros.at
> > index 48e94642b..f494af5f5 100644
> > --- a/tests/system-kmod-macros.at
> > +++ b/tests/system-kmod-macros.at
> > @@ -59,7 +59,6 @@ m4_define([CONFIGURE_VETH_OFFLOADS],
> >   # kernel conntrack tables when the test is finished.
> >   #
> >   m4_define([CHECK_CONNTRACK],
> > -    [AT_SKIP_IF([test $HAVE_PYTHON = no])
> >        m4_foreach([mod], [[nf_conntrack_ipv4], [nf_conntrack_ipv6], [nf_nat_ftp],
> >                           [nf_nat_tftp]],
> >                   [modprobe mod || echo "Module mod not loaded."
> > diff --git a/tests/system-userspace-macros.at b/tests/system-userspace-macros.at
> > index 89735bf16..d8cc686c2 100644
> > --- a/tests/system-userspace-macros.at
> > +++ b/tests/system-userspace-macros.at
> > @@ -63,7 +63,6 @@ m4_define([CONFIGURE_VETH_OFFLOADS],
> >   # Perform requirements checks for running conntrack tests.
> >   #
> >   m4_define([CHECK_CONNTRACK],
> > -    [AT_SKIP_IF([test $HAVE_PYTHON = no])]
> >   )
> >
> >   # CHECK_CONNTRACK_ALG()
> > diff --git a/utilities/bugtool/automake.mk b/utilities/bugtool/automake.mk
> > index b8c52d339..69b29e600 100644
> > --- a/utilities/bugtool/automake.mk
> > +++ b/utilities/bugtool/automake.mk
> > @@ -1,4 +1,3 @@
> > -if HAVE_PYTHON2
> >   bugtool_plugins = \
> >       utilities/bugtool/plugins/network-status/ovn.xml
> >
> > @@ -35,7 +34,6 @@ bugtool-uninstall-local:
> >           rm -rf "$(DESTDIR)$(bugtoolpluginsdir)/$$dir"; \
> >         fi \
> >       done; exit 0
> > -endif
> >
> >   EXTRA_DIST += \
> >       $(bugtool_plugins) \
> > diff --git a/utilities/ovn-detrace.in b/utilities/ovn-detrace.in
> > index c842adc32..f59544259 100755
> > --- a/utilities/ovn-detrace.in
> > +++ b/utilities/ovn-detrace.in
> > @@ -1,4 +1,4 @@
> > -#! @PYTHON@
> > +#! @PYTHON3@
> >   #
> >   # Copyright (c) 2017 eBay Inc.
> >   #
> > diff --git a/utilities/ovn-docker-overlay-driver.in b/utilities/ovn-docker-overlay-driver.in
> > index 65edfcd9d..f408bbdd8 100755
> > --- a/utilities/ovn-docker-overlay-driver.in
> > +++ b/utilities/ovn-docker-overlay-driver.in
> > @@ -1,4 +1,4 @@
> > -#! @PYTHON@
> > +#! @PYTHON3@
> >   # Copyright (C) 2015 Nicira, Inc.
> >   #
> >   # Licensed under the Apache License, Version 2.0 (the "License");
> > diff --git a/utilities/ovn-docker-underlay-driver.in b/utilities/ovn-docker-underlay-driver.in
> > index d91ce9fca..229418500 100755
> > --- a/utilities/ovn-docker-underlay-driver.in
> > +++ b/utilities/ovn-docker-underlay-driver.in
> > @@ -1,4 +1,4 @@
> > -#! @PYTHON@
> > +#! @PYTHON3@
> >   # Copyright (C) 2015 Nicira, Inc.
> >   #
> >   # Licensed under the Apache License, Version 2.0 (the "License");
> >
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>

Patch
diff mbox series

diff --git a/Makefile.am b/Makefile.am
index 1e41e49ea..8eed7a72b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -71,7 +71,7 @@  endif
 # foo/__init__.pyc will cause Python to ignore foo.py.
 run_python = \
 	PYTHONPATH=$(OVS_SRCDIR)/python$(psep)$$PYTHONPATH \
-	PYTHONDONTWRITEBYTECODE=yes $(PYTHON)
+	PYTHONDONTWRITEBYTECODE=yes $(PYTHON3)
 
 ALL_LOCAL =
 BUILT_SOURCES =
@@ -165,13 +165,13 @@  ro_shell = printf '\043 Generated automatically -- do not modify!    -*- buffer-
 
 SUFFIXES += .in
 .in:
-	$(AM_V_GEN)PYTHONPATH=$(OVS_SRCDIR)/python$(psep)$$PYTHONPATH$(psep)$(srcdir)/python $(PYTHON) $(srcdir)/build-aux/soexpand.py -I$(srcdir) -I$(OVS_SRCDIR) < $< | \
-	  $(PYTHON) $(srcdir)/build-aux/dpdkstrip.py $(DPDKSTRIP_FLAGS) | \
+	$(AM_V_GEN)PYTHONPATH=$(OVS_SRCDIR)/python$(psep)$$PYTHONPATH$(psep)$(srcdir)/python $(PYTHON3) $(srcdir)/build-aux/soexpand.py -I$(srcdir) -I$(OVS_SRCDIR) < $< | \
+	  $(PYTHON3) $(srcdir)/build-aux/dpdkstrip.py $(DPDKSTRIP_FLAGS) | \
 	  sed \
 	    -e 's,[@]PKIDIR[@],$(PKIDIR),g' \
 	    -e 's,[@]LOGDIR[@],$(LOGDIR),g' \
 	    -e 's,[@]DBDIR[@],$(DBDIR),g' \
-	    -e 's,[@]PYTHON[@],$(PYTHON),g' \
+	    -e 's,[@]PYTHON3[@],$(PYTHON3),g' \
 	    -e 's,[@]OVN_RUNDIR[@],$(OVN_RUNDIR),g' \
 	    -e 's,[@]OVSBUILDDIR[@],$(OVSBUILDDIR),g' \
 	    -e 's,[@]VERSION[@],$(VERSION),g' \
@@ -197,7 +197,7 @@  SUFFIXES += .xml
 	  PKIDIR='$(PKIDIR)' \
 	  LOGDIR='$(LOGDIR)' \
 	  DBDIR='$(DBDIR)' \
-	  PYTHON='$(PYTHON)' \
+	  PYTHON3='$(PYTHON3)' \
 	  RUNDIR='$(RUNDIR)' \
 	  OVN_RUNDIR='$(OVN_RUNDIR)' \
 	  VERSION='$(VERSION)' \
@@ -425,7 +425,7 @@  CLEANFILES += flake8-check
 
 include $(srcdir)/manpages.mk
 $(srcdir)/manpages.mk: $(MAN_ROOTS) build-aux/sodepends.py $(OVS_SRCDIR)/python/build/soutil.py
-	@PYTHONPATH=$(OVS_SRCDIR)/python$(psep)$$PYTHONPATH$(psep)$(srcdir)/python $(PYTHON) $(srcdir)/build-aux/sodepends.py -I. -I$(srcdir) -I$(OVS_MANDIR) $(MAN_ROOTS) >$(@F).tmp
+	@PYTHONPATH=$(OVS_SRCDIR)/python$(psep)$$PYTHONPATH$(psep)$(srcdir)/python $(PYTHON3) $(srcdir)/build-aux/sodepends.py -I. -I$(srcdir) -I$(OVS_MANDIR) $(MAN_ROOTS) >$(@F).tmp
 	@if cmp -s $(@F).tmp $@; then \
 	  touch $@; \
 	  rm -f $(@F).tmp; \
diff --git a/automake.mk b/automake.mk
index ad801f1e5..591e00751 100644
--- a/automake.mk
+++ b/automake.mk
@@ -6,19 +6,17 @@  CLEANFILES += ovn-architecture.7
 #
 # If "python" or "dot" is not available, then we do not add graphical diagram
 # to the documentation.
-if HAVE_PYTHON
 if HAVE_DOT
 OVSDB_DOT = $(run_python) ${OVSDIR}/ovsdb/ovsdb-dot.in
 ovn-nb.gv: ${OVSDIR}/ovsdb/ovsdb-dot.in $(srcdir)/ovn-nb.ovsschema
 	$(AM_V_GEN)$(OVSDB_DOT) --no-arrows $(srcdir)/ovn-nb.ovsschema > $@
 ovn-nb.pic: ovn-nb.gv ${OVSDIR}/ovsdb/dot2pic
-	$(AM_V_GEN)(dot -T plain < ovn-nb.gv | $(PYTHON) ${OVSDIR}/ovsdb/dot2pic -f 3) > $@.tmp && \
+	$(AM_V_GEN)(dot -T plain < ovn-nb.gv | $(PYTHON3) ${OVSDIR}/ovsdb/dot2pic -f 3) > $@.tmp && \
 	mv $@.tmp $@
 OVN_NB_PIC = ovn-nb.pic
 OVN_NB_DOT_DIAGRAM_ARG = --er-diagram=$(OVN_NB_PIC)
 CLEANFILES += ovn-nb.gv ovn-nb.pic
 endif
-endif
 
 # OVN northbound schema documentation
 EXTRA_DIST += ovn-nb.xml
@@ -39,18 +37,16 @@  ovn-nb.5: \
 #
 # If "python" or "dot" is not available, then we do not add graphical diagram
 # to the documentation.
-if HAVE_PYTHON
 if HAVE_DOT
 ovn-sb.gv: ${OVSDIR}/ovsdb/ovsdb-dot.in $(srcdir)/ovn-sb.ovsschema
 	$(AM_V_GEN)$(OVSDB_DOT) --no-arrows $(srcdir)/ovn-sb.ovsschema > $@
 ovn-sb.pic: ovn-sb.gv ${OVSDIR}/ovsdb/dot2pic
-	$(AM_V_GEN)(dot -T plain < ovn-sb.gv | $(PYTHON) ${OVSDIR}/ovsdb/dot2pic -f 3) > $@.tmp && \
+	$(AM_V_GEN)(dot -T plain < ovn-sb.gv | $(PYTHON3) ${OVSDIR}/ovsdb/dot2pic -f 3) > $@.tmp && \
 	mv $@.tmp $@
 OVN_SB_PIC = ovn-sb.pic
 OVN_SB_DOT_DIAGRAM_ARG = --er-diagram=$(OVN_SB_PIC)
 CLEANFILES += ovn-sb.gv ovn-sb.pic
 endif
-endif
 
 # OVN southbound schema documentation
 EXTRA_DIST += ovn-sb.xml
diff --git a/build-aux/dpdkstrip.py b/build-aux/dpdkstrip.py
index 48c7f0693..b8b8ba9c8 100755
--- a/build-aux/dpdkstrip.py
+++ b/build-aux/dpdkstrip.py
@@ -1,4 +1,4 @@ 
-#! /usr/bin/env python
+#! /usr/bin/env python3
 # Copyright (c) 2017 Red Hat, Inc.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/build-aux/sodepends.py b/build-aux/sodepends.py
index 90cfaa0f7..45812bcbd 100755
--- a/build-aux/sodepends.py
+++ b/build-aux/sodepends.py
@@ -1,4 +1,4 @@ 
-#! /usr/bin/env python
+#! /usr/bin/env python3
 
 # Copyright (c) 2008, 2011, 2017 Nicira, Inc.
 #
diff --git a/build-aux/soexpand.py b/build-aux/soexpand.py
index 53ca64073..00adcf47a 100755
--- a/build-aux/soexpand.py
+++ b/build-aux/soexpand.py
@@ -1,4 +1,4 @@ 
-#! /usr/bin/env python
+#! /usr/bin/env python3
 
 # Copyright (c) 2008, 2017 Nicira, Inc.
 #
diff --git a/configure.ac b/configure.ac
index 78498181c..9b29cbfe4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -89,9 +89,7 @@  OVN_CHECK_COVERAGE
 OVS_CHECK_NDEBUG
 OVS_CHECK_OPENSSL
 OVN_CHECK_LOGDIR
-OVN_CHECK_PYTHON2
 OVN_CHECK_PYTHON3
-OVN_CHECK_PYTHON
 OVN_CHECK_FLAKE8
 OVN_CHECK_SPHINX
 OVN_CHECK_DOT
diff --git a/ipsec/ovs-monitor-ipsec.in b/ipsec/ovs-monitor-ipsec.in
index 4710be039..37e370324 100755
--- a/ipsec/ovs-monitor-ipsec.in
+++ b/ipsec/ovs-monitor-ipsec.in
@@ -1,4 +1,4 @@ 
-#! @PYTHON@
+#! @PYTHON3@
 # Copyright (c) 2017 Nicira, Inc.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/m4/ovn.m4 b/m4/ovn.m4
index 277468f7f..dacfabb2a 100644
--- a/m4/ovn.m4
+++ b/m4/ovn.m4
@@ -300,57 +300,16 @@  dnl Checks for valgrind/valgrind.h.
 AC_DEFUN([OVN_CHECK_VALGRIND],
   [AC_CHECK_HEADERS([valgrind/valgrind.h])])
 
-dnl Checks for Python 2.x, x >= 7.
-AC_DEFUN([OVN_CHECK_PYTHON2],
-  [AC_CACHE_CHECK(
-     [for Python 2.x for x >= 7],
-     [ovs_cv_python2],
-     [if test -n "$PYTHON2"; then
-        ovs_cv_python2=$PYTHON2
-      else
-        ovs_cv_python2=no
-        for binary in python2 python2.7 python; do
-          ovs_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-          for dir in $PATH; do
-            IFS=$ovs_save_IFS
-            test -z "$dir" && dir=.
-            if test -x "$dir"/"$binary" && "$dir"/"$binary" -c 'import sys
-if sys.hexversion >= 0x02070000 and sys.hexversion < 0x03000000:
-    sys.exit(0)
-else:
-    sys.exit(1)'; then
-              ovs_cv_python2=$dir/$binary
-              break 2
-            fi
-          done
-        done
-        if test "$ovs_cv_python2" != no && test -x "$ovs_cv_python2"; then
-          if ! "$ovs_cv_python2" -c 'import six ; six.moves.range' >&AS_MESSAGE_LOG_FD 2>&1; then
-            ovs_cv_python2=no
-            AC_MSG_WARN([Missing Python six library or version too old.])
-          fi
-        fi
-      fi])
-   AC_SUBST([HAVE_PYTHON2])
-   AM_MISSING_PROG([PYTHON2], [python2])
-   if test "$ovs_cv_python2" != no; then
-     PYTHON2=$ovs_cv_python2
-     HAVE_PYTHON2=yes
-   else
-     HAVE_PYTHON2=no
-   fi
-   AM_CONDITIONAL([HAVE_PYTHON2], [test "$HAVE_PYTHON2" = yes])])
-
-dnl Checks for Python 3.x, x >= 4.
+dnl Checks for Python 3.4 or later.
 AC_DEFUN([OVN_CHECK_PYTHON3],
   [AC_CACHE_CHECK(
-     [for Python 3.x for x >= 4],
+     [for Python 3 (version 3.4 or later)],
      [ovs_cv_python3],
      [if test -n "$PYTHON3"; then
         ovs_cv_python3=$PYTHON3
       else
         ovs_cv_python3=no
-        for binary in python3 python3.4; do
+        for binary in python3 python3.4 python3.5 python3.6 python3.7; do
           ovs_save_IFS=$IFS; IFS=$PATH_SEPARATOR
           for dir in $PATH; do
             IFS=$ovs_save_IFS
@@ -365,46 +324,12 @@  else:
             fi
           done
         done
-        if test "$ovs_cv_python3" != no; then
-          if test -x "$ovs_cv_python3" && ! "$ovs_cv_python3" -c 'import six' >/dev/null 2>&1; then
-            ovs_cv_python3=no
-            AC_MSG_WARN([Missing Python six library.])
-          fi
-        fi
       fi])
-   AC_SUBST([HAVE_PYTHON3])
-   AM_MISSING_PROG([PYTHON3], [python3])
-   if test "$ovs_cv_python3" != no; then
-     PYTHON3=$ovs_cv_python3
-     HAVE_PYTHON3=yes
-   else
-     HAVE_PYTHON3=no
+   if test "$ovs_cv_python3" = no; then
+     AC_MSG_ERROR([Python 3.4 or later is required but not found in $PATH, please install it or set $PYTHON3 to point to it])
    fi
-   AM_CONDITIONAL([HAVE_PYTHON3], [test "$HAVE_PYTHON3" = yes])])
-
-dnl Checks if you have any compatible Python version installed.
-dnl Python 2.7+ has the preference to 3.4+
-AC_DEFUN([OVN_CHECK_PYTHON],
-  [AC_CACHE_CHECK(
-     [for Python 2 or 3],
-     [ovs_cv_python],
-     [if test -n "$PYTHON"; then
-        ovs_cv_python=$PYTHON
-      else
-        ovs_cv_python=no
-        if test "$ovs_cv_python2" != no; then
-          ovs_cv_python=$ovs_cv_python2
-        elif test "$ovs_cv_python3" != no; then
-          ovs_cv_python=$ovs_cv_python3
-        else
-          AC_MSG_ERROR([Missing Python.])
-        fi
-      fi])
-    AC_SUBST([PYTHON])
-    PYTHON=$ovs_cv_python
-    AC_SUBST([HAVE_PYTHON])
-    HAVE_PYTHON=yes
-    AM_CONDITIONAL([HAVE_PYTHON], [test "$HAVE_PYTHON" = yes])])
+   AC_ARG_VAR([PYTHON3])
+   PYTHON3=$ovs_cv_python3])
 
 dnl Checks for flake8.
 AC_DEFUN([OVN_CHECK_FLAKE8],
diff --git a/rhel/ovn-fedora.spec.in b/rhel/ovn-fedora.spec.in
index 447b4fe6e..acde99793 100644
--- a/rhel/ovn-fedora.spec.in
+++ b/rhel/ovn-fedora.spec.in
@@ -16,11 +16,6 @@ 
 # as regular user, specify the '--without libcapng'
 %bcond_without libcapng
 
-# 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
-
 # Enable PIE, bz#955181
 %global _hardened_build 1
 
@@ -30,16 +25,6 @@ 
 %define _rundir /run
 %endif
 
-# define the python package prefix based on distribution version so that we can
-# simultaneously support RHEL-based and later Fedora versions in this spec file.
-%if 0%{?fedora} >= 25
-%define _py2 python2
-%endif
-
-%if 0%{?rhel} || 0%{?fedora} < 25
-%define _py2 python
-%endif
-
 Name: ovn
 Summary: Open Virtual Network support
 Group: System Environment/Daemons
@@ -61,16 +46,12 @@  Source10: http://openvswitch.org/releases/openvswitch-%{ovsver}.tar.gz
 BuildRequires: gcc gcc-c++
 BuildRequires: autoconf automake libtool
 BuildRequires: systemd-units openssl openssl-devel
-BuildRequires: %{_py2}-devel
-%if 0%{?fedora} > 22 || %{with build_python3}
 BuildRequires: python3-devel
-%endif
 BuildRequires: desktop-file-utils
 BuildRequires: groff graphviz
 BuildRequires: checkpolicy, selinux-policy-devel
 BuildRequires: /usr/bin/sphinx-build
 # make check dependencies
-BuildRequires: %{_py2}-twisted%{?rhel:-core} %{_py2}-zope-interface %{_py2}-six
 BuildRequires: procps-ng
 %if %{with libcapng}
 BuildRequires: libcap-ng libcap-ng-devel
@@ -127,7 +108,7 @@  OVN vtep controller
 %package docker
 Summary: Open Virtual Network support
 License: ASL 2.0
-Requires: ovn %{_py2}-openvswitch
+Requires: ovn python3-openvswitch
 Obsoletes: openvswitch-ovn-docker
 Provides: openvswitch-ovn-docker = %{?epoch:%{epoch}:}%{version}-%{release}
 
@@ -153,12 +134,7 @@  cd openvswitch-%{ovsver}
 %endif
         --enable-ssl \
         --with-pkidir=%{_sharedstatedir}/openvswitch/pki \
-%if 0%{?fedora} > 22 || %{with build_python3}
-        PYTHON3=%{__python3} \
-        PYTHON=%{__python2}
-%else
-        PYTHON=%{__python}
-%endif
+        PYTHON3=%{__python3}
 
 make %{?_smp_mflags}
 cd -
@@ -173,12 +149,7 @@  cd -
 %endif
         --enable-ssl \
         --with-pkidir=%{_sharedstatedir}/openvswitch/pki \
-%if 0%{?fedora} > 22 || %{with build_python3}
-        PYTHON3=%{__python3} \
-        PYTHON=%{__python2}
-%else
-        PYTHON=%{__python}
-%endif
+        PYTHON3=%{__python3}
 
 make %{?_smp_mflags}
 
diff --git a/tests/atlocal.in b/tests/atlocal.in
index f79473583..6976518ce 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -1,23 +1,13 @@ 
 # -*- shell-script -*-
 HAVE_OPENSSL='@HAVE_OPENSSL@'
 OPENSSL_SUPPORTS_SNI='@OPENSSL_SUPPORTS_SNI@'
-HAVE_PYTHON='@HAVE_PYTHON@'
-HAVE_PYTHON2='@HAVE_PYTHON2@'
 HAVE_PYTHON3='@HAVE_PYTHON3@'
 HAVE_UNBOUND='@HAVE_UNBOUND@'
 EGREP='@EGREP@'
 
-if test x"$PYTHON" = x; then
-    PYTHON='@PYTHON@'
-fi
-
-if test x"$PYTHON2" = x; then
-    PYTHON2='@PYTHON2@'
-fi
-
 if test x"$PYTHON3" = x; then
     PYTHON3='@PYTHON3@'
-
+    PYTHON='@PYTHON3@'
     # PYTHONCOERCECLOCALE=0 disables the Unicode compatibility warning on
     # stderr that breaks almost any Python3 test (PEP 0538)
     PYTHONCOERCECLOCALE=0
@@ -149,8 +139,8 @@  find_l7_lib()
 {
     set +x
     var=HAVE_`echo "$1" | tr '[a-z]' '[A-Z]'`
-    if test "$HAVE_PYTHON" = "yes"; then
-        result=$($PYTHON $abs_top_srcdir/tests/test-l7.py --help | grep "$1")
+    if test "$HAVE_PYTHON3" = "yes"; then
+        result=$($PYTHON3 $abs_top_srcdir/tests/test-l7.py --help | grep "$1")
         if test "x${result}" != x; then
             eval ${var}="yes"
         else
diff --git a/tests/checkpatch.at b/tests/checkpatch.at
index fe21acdf2..caf772884 100755
--- a/tests/checkpatch.at
+++ b/tests/checkpatch.at
@@ -6,7 +6,6 @@  OVS_START_SHELL_HELPERS
 # Runs checkpatch under Python 2 and Python 3, if installed, on the given
 # PATCH, expecting the specified set of ERRORS (and warnings).
 try_checkpatch() {
-    AT_SKIP_IF([test $HAVE_PYTHON2 = no && test $HAVE_PYTHON3 = no])
     # Take the patch to test from $1.  Remove an initial four-space indent
     # from it and, if it is just headers with no body, add a null body.
     echo "$1" | sed 's/^    //' > test.patch
@@ -22,7 +21,6 @@  try_checkpatch() {
         : > expout
     fi
 
-    try_checkpatch__ "$HAVE_PYTHON2" "$PYTHON2"
     try_checkpatch__ "$HAVE_PYTHON3" "$PYTHON3"
 }
 try_checkpatch__() {
diff --git a/tests/ovn-controller-vtep.at b/tests/ovn-controller-vtep.at
index d4744d76e..3092dd5ca 100644
--- a/tests/ovn-controller-vtep.at
+++ b/tests/ovn-controller-vtep.at
@@ -15,7 +15,6 @@  m4_define([OVN_CONTROLLER_VTEP_START],
   [
    AT_KEYWORDS([ovn])
    # this will cause skip when 'make check' using Windows setup.
-   AT_SKIP_IF([test $HAVE_PYTHON = no])
 
    dnl Create databases (ovn-nb, ovn-sb, vtep).
    AT_CHECK([ovsdb-tool create vswitchd.db $ovs_srcdir/vswitchd/vswitch.ovsschema])
diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at
index 989ed4f47..12597d3ad 100644
--- a/tests/ovn-northd.at
+++ b/tests/ovn-northd.at
@@ -1,6 +1,5 @@ 
 AT_BANNER([OVN northd])
 AT_SETUP([ovn -- check   from NBDB to SBDB])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 ovn-nbctl create Logical_Router name=R1
@@ -151,7 +150,6 @@  AT_CHECK([ovn-sbctl list ha_chassis_group | wc -l], [0], [0
 AT_CLEANUP
 
 AT_SETUP([ovn -- check Gateway_Chassis propagation from NBDB to SBDB backwards compatibility])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 ovn-nbctl create Logical_Router name=R1
@@ -200,7 +198,6 @@  AT_CHECK([ovn-sbctl list ha_chassis_group | wc -l], [0], [0
 AT_CLEANUP
 
 AT_SETUP([ovn -- check up state of VIF LSP])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 ovn-nbctl ls-add S1
@@ -214,7 +211,6 @@  AT_CHECK([test x`ovn-nbctl lsp-get-up S1-vm1` = xup])
 AT_CLEANUP
 
 AT_SETUP([ovn -- check up state of router LSP linked to a distributed LR])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 ovn-nbctl lr-add R1
@@ -230,7 +226,6 @@  AT_CHECK([test x`ovn-nbctl lsp-get-up S1-R1` = xup])
 AT_CLEANUP
 
 AT_SETUP([ovn -- check up state of router LSP linked to a gateway LR])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 ovn-sbctl chassis-add gw1 geneve 127.0.0.1
@@ -250,7 +245,6 @@  AT_CHECK([test x`ovn-nbctl lsp-get-up S1-R1` = xup])
 AT_CLEANUP
 
 AT_SETUP([ovn -- check up state of router LSP linked to an LRP with set Gateway Chassis])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 ovn-sbctl chassis-add gw1 geneve 127.0.0.1
@@ -418,7 +412,6 @@  OVS_APP_EXIT_AND_WAIT([ovn-northd])
 AT_CLEANUP
 
 AT_SETUP([ovn -- check HA_Chassis_Group propagation from NBDB to SBDB])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 ovn-nbctl --wait=sb ha-chassis-group-add hagrp1
@@ -900,7 +893,6 @@  OVS_APP_EXIT_AND_WAIT([ovn-northd])
 AT_CLEANUP
 
 AT_SETUP([ovn -- ovn-northd pause and resume])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 AT_CHECK([test xfalse = x`as northd ovs-appctl -t ovn-northd is-paused`])
@@ -938,7 +930,6 @@  OVS_WAIT_UNTIL([
 AT_CLEANUP
 
 AT_SETUP([ovn -- check Redirect Chassis propagation from NB to SB])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 ovn-sbctl chassis-add gw1 geneve 127.0.0.1
@@ -968,7 +959,6 @@  OVS_WAIT_UNTIL([ovn-sbctl get Port_Binding ${uuid} options:redirect-type], [0],
 AT_CLEANUP
 
 AT_SETUP([ovn -- check stateless dnat_and_snat rule])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 ovn-sbctl chassis-add gw1 geneve 127.0.0.1
diff --git a/tests/ovn.at b/tests/ovn.at
index 5fc2de2d3..efa89849e 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -1490,7 +1490,6 @@  AT_BANNER([OVN end-to-end tests])
 # 3 hypervisors, one logical switch, 3 logical ports per hypervisor
 AT_SETUP([ovn -- 3 HVs, 1 LS, 3 lports/HV])
 AT_KEYWORDS([ovnarp])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # Create hypervisors hv[123].
@@ -1785,7 +1784,6 @@  AT_CLEANUP
 # logical ports bound to chassis encap-ip.
 AT_SETUP([ovn -- 2 HVs, 1 LS, 2 lports/HV])
 AT_KEYWORDS([ovnarp])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # Create hypervisors hv[12].
@@ -1962,7 +1960,6 @@  OVN_CLEANUP([hv1],[hv2])
 AT_CLEANUP
 
 AT_SETUP([ovn -- trace 1 LS, 3 LSPs])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # Create a logical switch and some logical ports.
@@ -2185,7 +2182,6 @@  AT_CLEANUP
 # 2 locally attached networks (one flat, one vlan tagged over same device)
 # 2 ports per HV on each network
 AT_SETUP([ovn -- 2 HVs, 4 lports/HV, localnet ports])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # In this test cases we create 3 switches, all connected to same
@@ -2379,7 +2375,6 @@  AT_CLEANUP
 
 AT_SETUP([ovn -- vtep: 3 HVs, 1 VIFs/HV, 1 GW, 1 LS])
 AT_KEYWORDS([vtep])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # Configure the Northbound database
@@ -2581,7 +2576,6 @@  AT_CLEANUP
 
 # Similar test to "hardware GW"
 AT_SETUP([ovn -- 3 HVs, 1 VIFs/HV, 1 software GW, 1 LS])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # Configure the Northbound database
@@ -2730,7 +2724,6 @@  AT_CLEANUP
 
 # 3 hypervisors, 3 logical switches with 3 logical ports each, 1 logical router
 AT_SETUP([ovn -- 3 HVs, 3 LS, 3 lports/LS, 1 LR])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # Logical network:
@@ -3139,7 +3132,6 @@  OVN_CLEANUP([hv1], [hv2], [hv3])
 AT_CLEANUP
 
 AT_SETUP([ovn -- IP relocation using GARP request])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # Logical network:
@@ -3342,7 +3334,6 @@  AT_CLEANUP
 
 # 3 hypervisors, one logical switch, 3 logical ports per hypervisor
 AT_SETUP([ovn -- portsecurity : 3 HVs, 1 LS, 3 lports/HV])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # Create hypervisors hv[123].
@@ -3719,7 +3710,6 @@  OVN_CLEANUP([hv1],[hv2],[hv3])
 AT_CLEANUP
 
 AT_SETUP([ovn -- 2 HVs, 2 LS, 1 lport/LS, 2 peer LRs])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # Logical network:
@@ -3866,7 +3856,6 @@  AT_CLEANUP
 
 AT_SETUP([ovn -- 1 HV, 1 LS, 2 lport/LS, 1 LR])
 AT_KEYWORDS([router-admin-state])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # Logical network:
@@ -3978,7 +3967,6 @@  AT_CLEANUP
 
 AT_SETUP([ovn -- 1 HV, 2 LSs, 1 lport/LS, 1 LR])
 AT_KEYWORDS([router-admin-state])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # Logical network:
@@ -4093,7 +4081,6 @@  OVN_CLEANUP([hv1])
 AT_CLEANUP
 
 AT_SETUP([ovn -- 2 HVs, 3 LS, 1 lport/LS, 2 peer LRs, static routes])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # Logical network:
@@ -4246,7 +4233,6 @@  OVN_CLEANUP([hv1],[hv2])
 AT_CLEANUP
 
 AT_SETUP([ovn -- send gratuitous arp on localnet])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 ovn-nbctl ls-add lsw0
 net_add n1
@@ -4300,7 +4286,6 @@  OVN_CLEANUP([hv])
 AT_CLEANUP
 
 AT_SETUP([ovn -- 2 HVs, 3 LRs connected via LS, static routes])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # Logical network:
@@ -4477,7 +4462,6 @@  OVN_CLEANUP([hv1],[hv2])
 AT_CLEANUP
 
 AT_SETUP([ovn -- dhcpv4 : 1 HV, 2 LS, 2 LSPs/LS])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 ovn-nbctl ls-add ls1
@@ -4910,7 +4894,6 @@  OVN_CLEANUP([hv1])
 AT_CLEANUP
 
 AT_SETUP([ovn -- dhcpv6 : 1 HV, 2 LS, 5 LSPs])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 ovn-nbctl ls-add ls1
@@ -5182,7 +5165,6 @@  OVN_CLEANUP([hv1])
 AT_CLEANUP
 
 AT_SETUP([ovn -- 2 HVs, 2 LRs connected via LS, gateway router])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # Logical network:
@@ -5359,7 +5341,6 @@  AT_CLEANUP
 
 AT_SETUP([ovn -- icmp_reply: 1 HVs, 2 LSs, 1 lport/LS, 1 LR])
 AT_KEYWORDS([router-icmp-reply])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # Logical network:
@@ -5505,7 +5486,6 @@  AT_CLEANUP
 
 AT_SETUP([ovn -- policy-based routing: 1 HVs, 2 LSs, 1 lport/LS, 1 LR])
 AT_KEYWORDS([policy-based-routing])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # Logical network:
@@ -5691,7 +5671,6 @@  AT_CLEANUP
 
 AT_SETUP([ovn -- policy-based routing IPv6: 1 HVs, 3 LSs, 1 lport/LS, 1 LR])
 AT_KEYWORDS([policy-based-routing])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # Logical network:
@@ -5968,7 +5947,6 @@  OVN_CLEANUP([hv1])
 AT_CLEANUP
 
 AT_SETUP([ovn -- nd_na ])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 #TODO: since patch port for IPv6 logical router port is not ready not,
@@ -6067,7 +6045,6 @@  OVN_CLEANUP([hv1])
 AT_CLEANUP
 
 AT_SETUP([ovn -- ipam])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # Add a port to a switch that does not have a subnet set, then set the
@@ -6479,7 +6456,6 @@  OVS_APP_EXIT_AND_WAIT([ovn-northd])
 AT_CLEANUP
 
 AT_SETUP([ovn -- ipam connectivity])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 ovn-nbctl lr-add R1
@@ -6609,7 +6585,6 @@  AT_CLEANUP
 
 AT_SETUP([ovn -- ovs-vswitchd restart])
 AT_KEYWORDS([vswitchd])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 ovn-nbctl ls-add ls1
@@ -6703,7 +6678,6 @@  OVN_CLEANUP([hv1])
 AT_CLEANUP
 
 AT_SETUP([ovn -- send arp for nexthop])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # Topology: Two LSs - ls1 and ls2 are connected via router r0
@@ -6813,7 +6787,6 @@  OVN_CLEANUP([hv1])
 AT_CLEANUP
 
 AT_SETUP([ovn -- send gratuitous arp for nat ips in localnet])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 # Create logical switch
 ovn-nbctl ls-add ls0
@@ -6865,7 +6838,6 @@  OVN_CLEANUP([hv1])
 AT_CLEANUP
 
 AT_SETUP([ovn -- send gratuitous arp with nat-addresses router in localnet])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 # Create logical switch
 ovn-nbctl ls-add ls0
@@ -6963,7 +6935,6 @@  OVN_CLEANUP([hv1])
 AT_CLEANUP
 
 AT_SETUP([ovn -- conntrack zone allocation])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # Logical network:
@@ -7517,7 +7488,6 @@  OVN_CLEANUP([hv])
 AT_CLEANUP
 
 AT_SETUP([ovn -- read-only sb db:ptcp access])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 
 : > .$1.db.~lock~
 ovsdb-tool create ovn-sb.db "$abs_top_srcdir"/ovn-sb.ovsschema
@@ -7553,7 +7523,6 @@  OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 AT_CLEANUP
 
 AT_SETUP([ovn -- read-only sb db:pssl access])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 AT_SKIP_IF([test "$HAVE_OPENSSL" = no])
 PKIDIR="$(cd $abs_top_builddir/tests && pwd)"
 AT_SKIP_IF([expr "$PKIDIR" : ".*[ 	'\"
@@ -7610,7 +7579,6 @@  OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 AT_CLEANUP
 
 AT_SETUP([ovn -- nb connection/ssl commands])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 AT_SKIP_IF([test "$HAVE_OPENSSL" = no])
 PKIDIR="$(cd $abs_top_builddir/tests && pwd)"
 AT_SKIP_IF([expr "$PKIDIR" : ".*[ 	'\"
@@ -7662,7 +7630,6 @@  OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 AT_CLEANUP
 
 AT_SETUP([ovn -- sb connection/ssl commands])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 AT_SKIP_IF([test "$HAVE_OPENSSL" = no])
 PKIDIR="$(cd $abs_top_builddir/tests && pwd)"
 AT_SKIP_IF([expr "$PKIDIR" : ".*[ 	'\"
@@ -7919,7 +7886,6 @@  OVN_CLEANUP([hv1],[hv2])
 AT_CLEANUP
 
 AT_SETUP([ovn -- 3 HVs, 3 LRs connected via LS, source IP based routes])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # Logical network:
@@ -8120,7 +8086,6 @@  OVN_CLEANUP([hv1],[hv2],[hv3])
 AT_CLEANUP
 
 AT_SETUP([ovn -- dns lookup : 1 HV, 2 LS, 2 LSPs/LS])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 ovn-nbctl ls-add ls1
@@ -8534,7 +8499,6 @@  OVN_CLEANUP([hv1])
 AT_CLEANUP
 
 AT_SETUP([ovn -- 4 HV, 1 LS, 1 LR, packet test with HA distributed router gateway port])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 net_add n1
@@ -8761,7 +8725,6 @@  OVN_CLEANUP([hv1],[gw1],[ext1])
 AT_CLEANUP
 
 AT_SETUP([ovn -- 4 HV, 3 LS, 2 LR, packet test with HA distributed router gateway port])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 net_add n1
@@ -8980,7 +8943,6 @@  OVN_CLEANUP([hv1],[gw1],[gw2],[ext1])
 AT_CLEANUP
 
 AT_SETUP([ovn -- 1 LR with distributed router gateway port])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # Logical network:
@@ -9308,7 +9270,6 @@  OVN_CLEANUP([hv1],[hv2],[hv3])
 AT_CLEANUP
 
 AT_SETUP([ovn -- send gratuitous arp for NAT rules on distributed router])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 # Create logical switches
 ovn-nbctl ls-add ls0
@@ -9450,7 +9411,6 @@  AT_CLEANUP
 # gateway port should use vlans(i.e input network vlan tag) across hypervisors
 # instead of tunneling.
 AT_SETUP([ovn -- vlan traffic for external network with distributed router gateway port])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # Logical network:
@@ -9769,7 +9729,6 @@  AT_CLEANUP
 
 AT_SETUP([ovn -- IPv6 ND Router Solicitation responder])
 AT_KEYWORDS([ovn-nd_ra])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # In this test case we create 1 lswitch with 3 VIF ports attached,
@@ -10017,7 +9976,6 @@  OVN_CLEANUP([hv1])
 AT_CLEANUP
 
 AT_SETUP([ovn -- /32 router IP address])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # Logical network:
@@ -10115,7 +10073,6 @@  OVN_CLEANUP([hv1],[hv2])
 AT_CLEANUP
 
 AT_SETUP([ovn -- 2 HVs, 1 lport/HV, localport ports])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 ovn-nbctl ls-add ls1
@@ -10237,7 +10194,6 @@  OVN_CLEANUP([hv1],[hv2])
 AT_CLEANUP
 
 AT_SETUP([ovn -- 1 LR with HA distributed router gateway port])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 net_add n1
@@ -10792,7 +10748,6 @@  OVN_CLEANUP([gw1],[gw2],[hv1],[hv2])
 AT_CLEANUP
 
 AT_SETUP([ovn -- send gratuitous ARP for NAT rules on HA distributed router])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 ovn-nbctl ls-add ls0
 ovn-nbctl ls-add ls1
@@ -10963,7 +10918,6 @@  OVN_CLEANUP([hv1],[hv2],[hv3])
 AT_CLEANUP
 
 AT_SETUP([ovn -- ensure one gw controller restart in HA doesn't bounce the master])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 net_add n1
@@ -11060,7 +11014,6 @@  AT_CLEANUP
 
 AT_SETUP([ovn -- IPv6 Neighbor Solicitation for unknown MAC])
 AT_KEYWORDS([ovn-nd_ns for unknown mac])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 ovn-nbctl ls-add sw0_ip6
@@ -11523,7 +11476,6 @@  AT_CLEANUP
 
 AT_SETUP([ovn -- ACL reject rule test])
 AT_KEYWORDS([acl-reject])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # test_ip_packet INPORT HV ETH_SRC ETH_DST IPV4_SRC IPV4_DST IP_CHKSUM EXP_IP_CHKSUM EXP_ICMP_CHKSUM
@@ -11665,7 +11617,6 @@  AT_CLEANUP
 
 AT_SETUP([ovn -- Port Groups])
 AT_KEYWORDS([ovnpg])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # Logical network:
@@ -11891,7 +11842,6 @@  AT_CLEANUP
 
 AT_SETUP([ovn -- ACLs on Port Groups])
 AT_KEYWORDS([ovnpg_acl])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # Logical network:
@@ -12377,7 +12327,6 @@  AT_CLEANUP
 
 AT_SETUP([ovn -- TTL exceeded])
 AT_KEYWORDS([ttl-exceeded])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # test_ip_packet INPORT HV ETH_SRC ETH_DST IPV4_SRC IPV4_DST IPV4_ROUTER IP_CHKSUM EXP_IP_CHKSUM EXP_ICMP_CHKSUM
@@ -12474,7 +12423,6 @@  AT_CLEANUP
 
 AT_SETUP([ovn -- router port unreachable])
 AT_KEYWORDS([router-port-unreachable])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # test_ip_packet INPORT HV ETH_SRC ETH_DST IPV4_SRC IPV4_ROUTER L4_PROTCOL IP_CHKSUM EXP_IP_CHKSUM EXP_ICMP_CHKSUM EXP_ICMP_CODE
@@ -12623,7 +12571,6 @@  OVN_CLEANUP([hv1], [hv2])
 AT_CLEANUP
 
 AT_SETUP([ovn -- ovn-controller exit])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 # Logical network:
 # One Logical Router: ro, with two logical switches sw1 and sw2.
@@ -12714,7 +12661,6 @@  OVN_CLEANUP([hv1],[hv2])
 AT_CLEANUP
 
 AT_SETUP([ovn -- external logical port])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 net_add n1
@@ -13450,7 +13396,6 @@  AT_CLEANUP
 
 AT_SETUP([ovn -- Address Set Incremental Processing])
 AT_KEYWORDS([ovn_as_inc])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 net_add n1
@@ -13524,7 +13469,6 @@  OVN_CLEANUP([hv1])
 AT_CLEANUP
 
 AT_SETUP([ovn -- ovn-controller restart])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # Logical network:
@@ -13677,7 +13621,6 @@  AT_CLEANUP
 
 AT_SETUP([ovn -- router - check packet length - icmp defrag])
 AT_KEYWORDS([check packet length])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 ovn-nbctl ls-add sw0
@@ -13852,7 +13795,6 @@  AT_CLEANUP
 
 AT_SETUP([ovn -- IP packet buffering])
 AT_KEYWORDS([ip-buffering])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # Logical network:
@@ -13997,7 +13939,6 @@  OVN_CLEANUP([hv1],[hv2])
 AT_CLEANUP
 
 AT_SETUP([ovn -- neighbor update on same HV])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # Logical network:
@@ -14507,7 +14448,6 @@  AT_CLEANUP
 
 AT_SETUP([ovn -- virtual ports])
 AT_KEYWORDS([virtual ports])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 send_garp() {
@@ -14932,7 +14872,6 @@  OVN_CLEANUP([hv1], [hv2])
 AT_CLEANUP
 
 AT_SETUP([ovn -- IGMP snoop/querier/relay])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # Logical network:
@@ -16112,7 +16051,6 @@  AT_CLEANUP
 
 AT_SETUP([ovn -- ARP lookup before learning])
 AT_KEYWORDS([virtual ports])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 send_garp() {
diff --git a/tests/ovsdb-macros.at b/tests/ovsdb-macros.at
index 83e3df750..7664a53cd 100644
--- a/tests/ovsdb-macros.at
+++ b/tests/ovsdb-macros.at
@@ -38,7 +38,6 @@  m4_define([OVSDB_CHECK_POSITIVE],
 # TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
 m4_define([OVSDB_CHECK_POSITIVE_PY],
   [AT_SETUP([$1])
-   AT_SKIP_IF([test $HAVE_PYTHON2 = no])
    $6
    AT_KEYWORDS([ovsdb positive Python $4])
    AT_CHECK([$PYTHON2 $srcdir/test-ovsdb.py $2], [0], [$3
@@ -57,7 +56,6 @@  m4_define([OVSDB_CHECK_POSITIVE_PY],
 # TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
 m4_define([OVSDB_CHECK_POSITIVE_PY3],
   [AT_SETUP([$1])
-   AT_SKIP_IF([test $HAVE_PYTHON3 = no])
    $6
    AT_KEYWORDS([ovsdb positive Python $4])
    AT_CHECK([$PYTHON3 $srcdir/test-ovsdb.py $2], [0], [$3
@@ -100,7 +98,6 @@  m4_define([OVSDB_CHECK_NEGATIVE],
 # TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
 m4_define([OVSDB_CHECK_NEGATIVE_PY],
   [AT_SETUP([$1])
-   AT_SKIP_IF([test $HAVE_PYTHON2 = no])
    AT_KEYWORDS([ovsdb negative $4])
    AT_CHECK([$PYTHON2 $srcdir/test-ovsdb.py $2], [1], [], [stderr])
    m4_assert(m4_len([$3]))
@@ -121,7 +118,6 @@  m4_define([OVSDB_CHECK_NEGATIVE_PY],
 # TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
 m4_define([OVSDB_CHECK_NEGATIVE_PY],
   [AT_SETUP([$1])
-   AT_SKIP_IF([test $HAVE_PYTHON3 = no])
    AT_KEYWORDS([ovsdb negative $4])
    AT_CHECK([$PYTHON3 $srcdir/test-ovsdb.py $2], [1], [], [stderr])
    m4_assert(m4_len([$3]))
diff --git a/tests/system-kmod-macros.at b/tests/system-kmod-macros.at
index 48e94642b..f494af5f5 100644
--- a/tests/system-kmod-macros.at
+++ b/tests/system-kmod-macros.at
@@ -59,7 +59,6 @@  m4_define([CONFIGURE_VETH_OFFLOADS],
 # kernel conntrack tables when the test is finished.
 #
 m4_define([CHECK_CONNTRACK],
-    [AT_SKIP_IF([test $HAVE_PYTHON = no])
      m4_foreach([mod], [[nf_conntrack_ipv4], [nf_conntrack_ipv6], [nf_nat_ftp],
                         [nf_nat_tftp]],
                 [modprobe mod || echo "Module mod not loaded."
diff --git a/tests/system-userspace-macros.at b/tests/system-userspace-macros.at
index 89735bf16..d8cc686c2 100644
--- a/tests/system-userspace-macros.at
+++ b/tests/system-userspace-macros.at
@@ -63,7 +63,6 @@  m4_define([CONFIGURE_VETH_OFFLOADS],
 # Perform requirements checks for running conntrack tests.
 #
 m4_define([CHECK_CONNTRACK],
-    [AT_SKIP_IF([test $HAVE_PYTHON = no])]
 )
 
 # CHECK_CONNTRACK_ALG()
diff --git a/utilities/bugtool/automake.mk b/utilities/bugtool/automake.mk
index b8c52d339..69b29e600 100644
--- a/utilities/bugtool/automake.mk
+++ b/utilities/bugtool/automake.mk
@@ -1,4 +1,3 @@ 
-if HAVE_PYTHON2
 bugtool_plugins = \
 	utilities/bugtool/plugins/network-status/ovn.xml
 
@@ -35,7 +34,6 @@  bugtool-uninstall-local:
 	    rm -rf "$(DESTDIR)$(bugtoolpluginsdir)/$$dir"; \
 	  fi \
 	done; exit 0
-endif
 
 EXTRA_DIST += \
 	$(bugtool_plugins) \
diff --git a/utilities/ovn-detrace.in b/utilities/ovn-detrace.in
index c842adc32..f59544259 100755
--- a/utilities/ovn-detrace.in
+++ b/utilities/ovn-detrace.in
@@ -1,4 +1,4 @@ 
-#! @PYTHON@
+#! @PYTHON3@
 #
 # Copyright (c) 2017 eBay Inc.
 #
diff --git a/utilities/ovn-docker-overlay-driver.in b/utilities/ovn-docker-overlay-driver.in
index 65edfcd9d..f408bbdd8 100755
--- a/utilities/ovn-docker-overlay-driver.in
+++ b/utilities/ovn-docker-overlay-driver.in
@@ -1,4 +1,4 @@ 
-#! @PYTHON@
+#! @PYTHON3@
 # Copyright (C) 2015 Nicira, Inc.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/utilities/ovn-docker-underlay-driver.in b/utilities/ovn-docker-underlay-driver.in
index d91ce9fca..229418500 100755
--- a/utilities/ovn-docker-underlay-driver.in
+++ b/utilities/ovn-docker-underlay-driver.in
@@ -1,4 +1,4 @@ 
-#! @PYTHON@
+#! @PYTHON3@
 # Copyright (C) 2015 Nicira, Inc.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");