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 /Vagrantfile | |
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 'Vagrantfile')
-rw-r--r-- | Vagrantfile | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/Vagrantfile b/Vagrantfile index fbd772a1b..236e3a7bd 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -8,12 +8,14 @@ Vagrant.require_version ">=1.7.0" $bootstrap_fedora = <<SCRIPT dnf -y update dnf -y install autoconf automake openssl-devel libtool \ - python-devel python3-devel \ - python-twisted python-zope-interface \ + python3-devel \ + python3-twisted python3-zope-interface \ desktop-file-utils groff graphviz rpmdevtools nc curl \ - wget python-six pyftpdlib checkpolicy selinux-policy-devel \ - libcap-ng-devel kernel-devel-`uname -r` ethtool python-tftpy \ + wget python3-six python3-pyftpdlib checkpolicy \ + selinux-policy-devel \ + libcap-ng-devel kernel-devel-`uname -r` ethtool python3-pip \ lftp +pip-3 install tftpy # Not yet available for Python3 via dnf. echo "search extra update built-in" >/etc/depmod.d/search_path.conf SCRIPT @@ -24,21 +26,23 @@ aptitude -y install -R \ build-essential dpkg-dev lintian devscripts fakeroot \ debhelper dh-autoreconf uuid-runtime \ autoconf automake libtool \ - python-all python-twisted-core python-twisted-conch \ + python3-all python3-twisted-core python3-twisted-conch \ xdg-utils groff graphviz netcat curl \ - wget python-six ethtool \ - libcap-ng-dev libssl-dev python-dev openssl \ - python-pyftpdlib python-flake8 python-tftpy \ + wget python3-six ethtool \ + libcap-ng-dev libssl-dev python3-dev openssl \ + python3-pyftpdlib python3-flake8 \ linux-headers-`uname -r` \ lftp +pip-3 install tftpy # Not yet available for Python3 via apt. SCRIPT $bootstrap_centos = <<SCRIPT yum -y update yum -y install autoconf automake openssl-devel libtool \ - python-twisted-core python-zope-interface \ + python3-twisted-core python3-zope-interface \ desktop-file-utils groff graphviz rpmdevtools nc curl \ - wget python-six pyftpdlib checkpolicy selinux-policy-devel \ + wget python3-six python3-pyftpdlib checkpolicy \ + selinux-policy-devel \ libcap-ng-devel kernel-devel-`uname -r` ethtool net-tools \ lftp SCRIPT |