diff options
author | Ben Pfaff <blp@ovn.org> | 2019-09-20 08:30:42 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2019-09-27 09:23:50 -0700 |
commit | 1ca0323e7c29dc7ef5a615c265df0460208f92de (patch) | |
tree | 377630fee2130b269cfe2fd348c9e8c6bc5a814a /Documentation | |
parent | 187bb41fbf447acf9fb6ac117dc923bbe649e78c (diff) | |
download | openvswitch-1ca0323e7c29dc7ef5a615c265df0460208f92de.tar.gz |
Require Python 3 and remove support for Python 2.
Python 2 reaches end-of-life on January 1, 2020, which is only
a few months away. This means that OVS needs to stop depending
on in the next release that should occur roughly that same time.
Therefore, this commit removes all support for Python 2. It
also makes Python 3 a mandatory build dependency.
Some of the interesting consequences:
- HAVE_PYTHON, HAVE_PYTHON2, and HAVE_PYTHON3 conditionals have
been removed, since we now know that Python3 is available.
- $PYTHON and $PYTHON2 are removed, and $PYTHON3 is always
available.
- Many tests for Python 2 support have been removed, and the ones
that depended on Python 3 now run unconditionally. This allowed
several macros in the testsuite to be removed, making the code
clearer. This does make some of the changes to the testsuite
files large due to indentation level changes.
- #! lines for Python now use /usr/bin/python3 instead of
/usr/bin/python.
- Packaging depends on Python 3 packages.
Acked-by: Numan Siddique <nusiddiq@redhat.com>
Tested-by: Numan Siddique <nusiddiq@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/intro/install/fedora.rst | 4 | ||||
-rw-r--r-- | Documentation/intro/install/general.rst | 8 | ||||
-rw-r--r-- | Documentation/intro/install/netbsd.rst | 10 | ||||
-rw-r--r-- | Documentation/intro/install/rhel.rst | 2 | ||||
-rw-r--r-- | Documentation/intro/install/windows.rst | 4 | ||||
-rw-r--r-- | Documentation/intro/install/xenserver.rst | 4 |
6 files changed, 15 insertions, 17 deletions
diff --git a/Documentation/intro/install/fedora.rst b/Documentation/intro/install/fedora.rst index f11d05a01..6fe1fb5b2 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 b03d70f6f..e62501be7 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 7eb7f0ceb..4f60dad86 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 0e5ca2743..17b3bc26f 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 f696d2c9b..019e83e64 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 c0f5e3156..366e11ac2 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 -------- |