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

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

Commit Message

Numan Siddique Nov. 14, 2019, 2:42 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. Python3 is now mandatory,
otherwise configure will fail.

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>
---

v1 -> v2
=======
  * Addressed the review comments from Mark - Removed HAVE_PYTHON3 var
    and fixed ovn-detrace.in exception seen with python3.

 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                        | 23 ++-----
 tests/checkpatch.at                     | 12 ++--
 tests/ovn-controller-vtep.at            |  1 -
 tests/ovn-northd.at                     | 10 ---
 tests/ovn.at                            | 63 -----------------
 tests/ovsdb-macros.at                   |  4 --
 tests/system-kmod-macros.at             |  1 -
 tests/system-userspace-macros.at        |  1 -
 tutorial/ovs-sandbox                    |  1 +
 utilities/bugtool/automake.mk           |  2 -
 utilities/checkpatch.py                 |  3 +-
 utilities/ovn-detrace.in                |  6 +-
 utilities/ovn-docker-overlay-driver.in  |  2 +-
 utilities/ovn-docker-underlay-driver.in |  2 +-
 23 files changed, 36 insertions(+), 249 deletions(-)

Comments

0-day Robot Nov. 14, 2019, 2:59 p.m. UTC | #1
Bleep bloop.  Greetings Numan Siddique, I am a robot and I have tried out your patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


git-am:
error: Your local changes to the following files would be overwritten by merge:
	utilities/checkpatch.py
Please, commit your changes or stash them before you can merge.
Aborting
Failed to merge in the changes.
Patch failed at 0001 Require Python 3 and remove support for Python 2.
The copy of the patch that failed is found in:
   /var/lib/jenkins/jobs/upstream_build_from_pw/workspace/OVN/.git/rebase-apply/patch
When you have resolved this problem, run "git am --resolved".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".


Please check this out.  If you feel there has been an error, please email aconole@redhat.com

Thanks,
0-day Robot

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..5f14c3da0 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -1,23 +1,12 @@ 
 # -*- 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,13 +138,9 @@  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 "x${result}" != x; then
-            eval ${var}="yes"
-        else
-            eval ${var}="no"
-        fi
+    result=$($PYTHON3 $abs_top_srcdir/tests/test-l7.py --help | grep "$1")
+    if test "x${result}" != x; then
+        eval ${var}="yes"
     else
         eval ${var}="no"
     fi
diff --git a/tests/checkpatch.at b/tests/checkpatch.at
index fe21acdf2..8f45beac9 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,18 +21,15 @@  try_checkpatch() {
         : > expout
     fi
 
-    try_checkpatch__ "$HAVE_PYTHON2" "$PYTHON2"
-    try_checkpatch__ "$HAVE_PYTHON3" "$PYTHON3"
+    try_checkpatch__ "$PYTHON3"
 }
 try_checkpatch__() {
-    if test $1 = no; then
-        :
-    elif test -s expout; then
-        AT_CHECK([$2 $top_srcdir/utilities/checkpatch.py -q test.patch],
+    if test -s expout; then
+        AT_CHECK([$1 $top_srcdir/utilities/checkpatch.py -q test.patch],
                  [1], [stdout])
         AT_CHECK([sed '/^Lines checked:/,$d' stdout], [0], [expout])
     else
-        AT_CHECK([$2 $top_srcdir/utilities/checkpatch.py -q test.patch])
+        AT_CHECK([$1 $top_srcdir/utilities/checkpatch.py -q test.patch])
     fi
 }
 OVS_END_SHELL_HELPERS
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 4a10a11e9..a84b8b561 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:
@@ -3143,7 +3136,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:
@@ -3346,7 +3338,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].
@@ -3723,7 +3714,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:
@@ -3870,7 +3860,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:
@@ -3982,7 +3971,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:
@@ -4097,7 +4085,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:
@@ -4250,7 +4237,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
@@ -4304,7 +4290,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:
@@ -4481,7 +4466,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
@@ -4914,7 +4898,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
@@ -5186,7 +5169,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:
@@ -5363,7 +5345,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:
@@ -5509,7 +5490,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:
@@ -5695,7 +5675,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:
@@ -5972,7 +5951,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,
@@ -6071,7 +6049,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
@@ -6483,7 +6460,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
@@ -6613,7 +6589,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
@@ -6707,7 +6682,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
@@ -6817,7 +6791,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
@@ -6869,7 +6842,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
@@ -6967,7 +6939,6 @@  OVN_CLEANUP([hv1])
 AT_CLEANUP
 
 AT_SETUP([ovn -- conntrack zone allocation])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # Logical network:
@@ -7521,7 +7492,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
@@ -7557,7 +7527,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" : ".*[ 	'\"
@@ -7614,7 +7583,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" : ".*[ 	'\"
@@ -7666,7 +7634,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" : ".*[ 	'\"
@@ -7923,7 +7890,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:
@@ -8124,7 +8090,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
@@ -8538,7 +8503,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
@@ -8765,7 +8729,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
@@ -8984,7 +8947,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:
@@ -9312,7 +9274,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
@@ -9454,7 +9415,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:
@@ -9773,7 +9733,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,
@@ -10021,7 +9980,6 @@  OVN_CLEANUP([hv1])
 AT_CLEANUP
 
 AT_SETUP([ovn -- /32 router IP address])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # Logical network:
@@ -10119,7 +10077,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
@@ -10241,7 +10198,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
@@ -10796,7 +10752,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
@@ -10967,7 +10922,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
@@ -11064,7 +11018,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
@@ -11527,7 +11480,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
@@ -11669,7 +11621,6 @@  AT_CLEANUP
 
 AT_SETUP([ovn -- Port Groups])
 AT_KEYWORDS([ovnpg])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # Logical network:
@@ -11895,7 +11846,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:
@@ -12381,7 +12331,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
@@ -12478,7 +12427,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
@@ -12627,7 +12575,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.
@@ -12718,7 +12665,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
@@ -13454,7 +13400,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
@@ -13528,7 +13473,6 @@  OVN_CLEANUP([hv1])
 AT_CLEANUP
 
 AT_SETUP([ovn -- ovn-controller restart])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # Logical network:
@@ -13681,7 +13625,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
@@ -13856,7 +13799,6 @@  AT_CLEANUP
 
 AT_SETUP([ovn -- IP packet buffering])
 AT_KEYWORDS([ip-buffering])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 # Logical network:
@@ -14001,7 +13943,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:
@@ -14511,7 +14452,6 @@  AT_CLEANUP
 
 AT_SETUP([ovn -- virtual ports])
 AT_KEYWORDS([virtual ports])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 send_garp() {
@@ -14936,7 +14876,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:
@@ -16116,7 +16055,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() {
@@ -16714,7 +16652,6 @@  OVN_CLEANUP([hv1],[hv2],[hv3],[hv4])
 AT_CLEANUP
 
 AT_SETUP([ovn -- ARP/ND request broadcast limiting])
-AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
 
 ip_to_hex() {
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/tutorial/ovs-sandbox b/tutorial/ovs-sandbox
index 510651add..36cdb6b68 100755
--- a/tutorial/ovs-sandbox
+++ b/tutorial/ovs-sandbox
@@ -376,6 +376,7 @@  OVN_RUNDIR=$sandbox; export OVN_RUNDIR
 OVS_LOGDIR=$sandbox; export OVS_LOGDIR
 OVS_DBDIR=$sandbox; export OVS_DBDIR
 OVS_SYSCONFDIR=$sandbox; export OVS_SYSCONFDIR
+PYTHONPATH=$ovssrcdir/python:$PYTHONPATH; export PYTHONPATH
 
 if $built; then
     # Easy access to OVS manpages.
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/checkpatch.py b/utilities/checkpatch.py
index f8fa00e30..981a433be 100755
--- a/utilities/checkpatch.py
+++ b/utilities/checkpatch.py
@@ -1,4 +1,4 @@ 
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright (c) 2016, 2017 Red Hat, Inc.
 # Copyright (c) 2018 Nicira, Inc.
 #
@@ -13,7 +13,6 @@ 
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-from __future__ import print_function
 
 import email
 import getopt
diff --git a/utilities/ovn-detrace.in b/utilities/ovn-detrace.in
index c645658b2..970a39779 100755
--- a/utilities/ovn-detrace.in
+++ b/utilities/ovn-detrace.in
@@ -1,4 +1,4 @@ 
-#! @PYTHON@
+#! @PYTHON3@
 #
 # Copyright (c) 2017 eBay Inc.
 #
@@ -14,8 +14,6 @@ 
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from __future__ import print_function
-
 import functools
 import getopt
 import os
@@ -213,7 +211,7 @@  def main():
     try:
         options, args = getopt.gnu_getopt(sys.argv[1:], 'hV',
                                           ['help', 'version', 'ovnsb=', 'ovnnb='])
-    except getopt.GetoptError, geo:
+    except (getopt.GetoptError, geo):
         sys.stderr.write("%s: %s\n" % (argv0, geo.msg))
         sys.exit(1)
 
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");