diff --git a/.cirrus.yml b/.cirrus.yml index eb6af0a719c..bae5a089b24 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -9,8 +9,7 @@ freebsd_build_task: env: DEPENDENCIES: automake libtool gmake gcc wget openssl - python py27-six py27-sphinx py27-openssl - python3 py36-six py36-openssl + python3 py36-six py36-openssl p36-sphinx matrix: COMPILER: gcc COMPILER: clang diff --git a/.travis/osx-prepare.sh b/.travis/osx-prepare.sh index 58ccb67cddb..78d5bb57921 100755 --- a/.travis/osx-prepare.sh +++ b/.travis/osx-prepare.sh @@ -1,4 +1,4 @@ #!/bin/bash set -ev -pip2 install --user six -pip2 install --user --upgrade docutils +pip3 install --user six +pip3 install --user --upgrade docutils diff --git a/Documentation/intro/install/fedora.rst b/Documentation/intro/install/fedora.rst index f11d05a0104..6fe1fb5b246 100644 --- a/Documentation/intro/install/fedora.rst +++ b/Documentation/intro/install/fedora.rst @@ -102,7 +102,7 @@ in which `./configure` was executed: $ make rpm-fedora -This will create the RPMs `openvswitch`, `python-openvswitch`, +This will create the RPMs `openvswitch`, `python3-openvswitch`, `openvswitch-test`, `openvswitch-devel` and `openvswitch-debuginfo`. To enable DPDK support in the openvswitch package, the ``--with dpdk`` option @@ -151,7 +151,7 @@ Refer to the :doc:`/faq/index` for more information about the various Open vSwitch datapath options. In most cases only the `openvswitch` RPM will need to be installed. The -`python-openvswitch`, `openvswitch-test`, `openvswitch-devel`, and +`python3-openvswitch`, `openvswitch-test`, `openvswitch-devel`, and `openvswitch-debuginfo` RPMs are optional unless required for a specific purpose. diff --git a/Documentation/intro/install/general.rst b/Documentation/intro/install/general.rst index b03d70f6fa6..e62501be7fc 100644 --- a/Documentation/intro/install/general.rst +++ b/Documentation/intro/install/general.rst @@ -90,8 +90,8 @@ need the following software: If libcap-ng is installed, then Open vSwitch will automatically build with support for it. -- Python 2.7. You must also have the Python ``six`` library version 1.4.0 - or later. +- Python 3.4 or later. You must also have the Python ``six`` library + version 1.4.0 or later. - Unbound library, from http://www.unbound.net, is optional but recommended if you want to enable ovs-vswitchd and other utilities to use DNS names when @@ -203,8 +203,8 @@ simply install and run Open vSwitch you require the following software: from iproute2 (part of all major distributions and available at https://wiki.linuxfoundation.org/networking/iproute2). -- Python 2.7. You must also have the Python six library version 1.4.0 - or later. +- Python 3.4 or later. You must also have the Python six library + version 1.4.0 or later. On Linux you should ensure that ``/dev/urandom`` exists. To support TAP devices, you must also ensure that ``/dev/net/tun`` exists. diff --git a/Documentation/intro/install/netbsd.rst b/Documentation/intro/install/netbsd.rst index 7eb7f0cebba..4f60dad869b 100644 --- a/Documentation/intro/install/netbsd.rst +++ b/Documentation/intro/install/netbsd.rst @@ -31,20 +31,18 @@ you need at least the following packages. - automake - libtool-base - gmake -- python27 -- py27-six -- py27-xml +- python37 +- py37-six Some components have additional requirements. Refer to :doc:`general` for more information. -Assuming you are running NetBSD/amd64 6.1.2, you can download and install +Assuming you are running NetBSD/amd64 7.0.2, you can download and install pre-built binary packages as the following:: $ PKG_PATH=http://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/7.0.2/All/ $ export PKG_PATH - $ pkg_add automake libtool-base gmake python27 py27-six py27-xml \ - pkg_alternatives + $ pkg_add automake libtool-base gmake python37 py37-six pkg_alternatives .. note:: You might get some warnings about minor version mismatch. These can be safely diff --git a/Documentation/intro/install/rhel.rst b/Documentation/intro/install/rhel.rst index 0e5ca2743ef..17b3bc26f11 100644 --- a/Documentation/intro/install/rhel.rst +++ b/Documentation/intro/install/rhel.rst @@ -92,7 +92,7 @@ Once that is completed, remove the file ``/tmp/ovs.spec``. If python3-sphinx package is not available in your version of RHEL, you can install it via pip with 'pip install sphinx'. -Open vSwitch requires python 2.7 or newer which is not available in older +Open vSwitch requires python 3.4 or newer which is not available in older distributions. In the case of RHEL 6.x and its derivatives, one option is to install python34 and python34-six from `EPEL`_. diff --git a/Documentation/intro/install/windows.rst b/Documentation/intro/install/windows.rst index f696d2c9b62..019e83e6442 100644 --- a/Documentation/intro/install/windows.rst +++ b/Documentation/intro/install/windows.rst @@ -56,9 +56,9 @@ The following explains the steps in some detail. 'C:/MinGW /mingw'. -- Python +- Python 3.4 or later. - Install the latest Python 2.x from python.org and verify that its path is + Install the latest Python 3.x from python.org and verify that its path is part of Windows' PATH environment variable. We require that you have Python six and pypiwin32 libraries installed. The libraries can be installed via pip command: diff --git a/Documentation/intro/install/xenserver.rst b/Documentation/intro/install/xenserver.rst index c0f5e315669..366e11ac27a 100644 --- a/Documentation/intro/install/xenserver.rst +++ b/Documentation/intro/install/xenserver.rst @@ -30,8 +30,8 @@ XenServer host. If you want to install Open vSwitch on a generic Linux or BSD host, refer to :doc:`general` instead. Open vSwitch should work with XenServer 5.6.100 and later. However, Open -vSwitch requires Python 2.7 or later, so using Open vSwitch with XenServer 6.5 -or earlier requires installing Python 2.7. +vSwitch requires Python 3.4 or later, so using Open vSwitch with XenServer 6.5 +or earlier requires installing Python 3.x. Building -------- diff --git a/Makefile.am b/Makefile.am index ff1f94b4841..6030cdb495d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -60,7 +60,7 @@ endif # foo/__init__.pyc will cause Python to ignore foo.py. run_python = \ PYTHONPATH=$(top_srcdir)/python$(psep)$$PYTHONPATH \ - PYTHONDONTWRITEBYTECODE=yes $(PYTHON) + PYTHONDONTWRITEBYTECODE=yes $(PYTHON3) ALL_LOCAL = BUILT_SOURCES = @@ -147,13 +147,13 @@ ro_shell = printf '\043 Generated automatically -- do not modify! -*- buffer- SUFFIXES += .in .in: - $(AM_V_GEN)PYTHONPATH=$$PYTHONPATH$(psep)$(srcdir)/python $(PYTHON) $(srcdir)/build-aux/soexpand.py -I$(srcdir) < $< | \ - $(PYTHON) $(srcdir)/build-aux/dpdkstrip.py $(DPDKSTRIP_FLAGS) | \ + $(AM_V_GEN)PYTHONPATH=$$PYTHONPATH$(psep)$(srcdir)/python $(PYTHON3) $(srcdir)/build-aux/soexpand.py -I$(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,[@]RUNDIR[@],$(RUNDIR),g' \ -e 's,[@]VERSION[@],$(VERSION),g' \ -e 's,[@]localstatedir[@],$(localstatedir),g' \ @@ -177,7 +177,7 @@ SUFFIXES += .xml PKIDIR='$(PKIDIR)' \ LOGDIR='$(LOGDIR)' \ DBDIR='$(DBDIR)' \ - PYTHON='$(PYTHON)' \ + PYTHON3='$(PYTHON3)' \ RUNDIR='$(RUNDIR)' \ VERSION='$(VERSION)' \ localstatedir='$(localstatedir)' \ @@ -414,7 +414,7 @@ CLEANFILES += flake8-check include $(srcdir)/manpages.mk $(srcdir)/manpages.mk: $(MAN_ROOTS) build-aux/sodepends.py python/build/soutil.py - @PYTHONPATH=$$PYTHONPATH$(psep)$(srcdir)/python $(PYTHON) $(srcdir)/build-aux/sodepends.py -I. -I$(srcdir) $(MAN_ROOTS) >$(@F).tmp + @PYTHONPATH=$$PYTHONPATH$(psep)$(srcdir)/python $(PYTHON3) $(srcdir)/build-aux/sodepends.py -I. -I$(srcdir) $(MAN_ROOTS) >$(@F).tmp @if cmp -s $(@F).tmp $@; then \ touch $@; \ rm -f $(@F).tmp; \ diff --git a/Vagrantfile b/Vagrantfile index fbd772a1bec..236e3a7bdcb 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -8,12 +8,14 @@ Vagrant.require_version ">=1.7.0" $bootstrap_fedora = <