* [spp] [PATCH 0/3] Remove Python2 support
@ 2019-02-20 8:54 ogawa.yasufumi
2019-02-20 8:54 ` [spp] [PATCH 1/3] controller: remove python2 support ogawa.yasufumi
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: ogawa.yasufumi @ 2019-02-20 8:54 UTC (permalink / raw)
To: spp, ferruh.yigit, ogawa.yasufumi
From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
Hi all,
SPP supports both of Python2 and 3, but it might sometimes confuse
users and make maintainance hard a little. Considering reasons listed
here, remove Python2 support.
* SPP CLI support both of python2 and 3, but spp-ctl does not support
python2.
* Include all of required packages in `requirements.txt` for python3.
* Python2 will not be maintained after 2020.
Thanks,
Yasufumi
Yasufumi Ogawa (3):
controller: remove python2 support
project: update requirements.txt for pip3
docs: remove python2 and pip instructions
docs/guides/commands/experimental.rst | 31 ++++++++++++++++-----------
docs/guides/gsg/install.rst | 30 ++++++++++++++------------
docs/guides/gsg/setup.rst | 8 ++-----
requirements.txt | 9 ++++++++
src/controller/commands/pri.py | 2 --
src/controller/plugins/hello.py | 2 +-
src/controller/shell.py | 2 --
src/controller/shell_lib/common.py | 2 +-
src/controller/spp.py | 4 +---
src/controller/spp_common.py | 2 +-
src/controller/spp_ctl_client.py | 2 +-
src/controller/websocket/spp_ws.py | 2 +-
src/spp.py | 3 +--
13 files changed, 52 insertions(+), 47 deletions(-)
--
2.17.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [spp] [PATCH 1/3] controller: remove python2 support
2019-02-20 8:54 [spp] [PATCH 0/3] Remove Python2 support ogawa.yasufumi
@ 2019-02-20 8:54 ` ogawa.yasufumi
2019-02-20 8:54 ` [spp] [PATCH 2/3] project: update requirements.txt for pip3 ogawa.yasufumi
2019-02-20 8:54 ` [spp] [PATCH 3/3] docs: remove python2 and pip instructions ogawa.yasufumi
2 siblings, 0 replies; 4+ messages in thread
From: ogawa.yasufumi @ 2019-02-20 8:54 UTC (permalink / raw)
To: spp, ferruh.yigit, ogawa.yasufumi; +Cc: Itsuro Oda
From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
This update is to remove python2 supportfor the reasons.
* SPP CLI support both of python2 and 3, but spp-ctl does not support
python2.
* Include all of required packages in `requirements.txt` for python3.
* Python2 will not be maintained after 2020.
Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
Signed-off-by: Itsuro Oda <oda@valinux.co.jp>
---
src/controller/commands/pri.py | 2 --
src/controller/plugins/hello.py | 2 +-
src/controller/shell.py | 2 --
src/controller/shell_lib/common.py | 2 +-
src/controller/spp.py | 4 +---
src/controller/spp_common.py | 2 +-
src/controller/spp_ctl_client.py | 2 +-
src/controller/websocket/spp_ws.py | 2 +-
src/spp.py | 3 +--
9 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/src/controller/commands/pri.py b/src/controller/commands/pri.py
index 2e3c208..7043c2f 100644
--- a/src/controller/commands/pri.py
+++ b/src/controller/commands/pri.py
@@ -1,8 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Nippon Telegraph and Telephone Corporation
-from __future__ import absolute_import
-
from .. import spp_common
from ..shell_lib import common
from ..spp_common import logger
diff --git a/src/controller/plugins/hello.py b/src/controller/plugins/hello.py
index 905f476..f0189f5 100644
--- a/src/controller/plugins/hello.py
+++ b/src/controller/plugins/hello.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017-2018 Nippon Telegraph and Telephone Corporation
diff --git a/src/controller/shell.py b/src/controller/shell.py
index f95dbfa..21543d1 100644
--- a/src/controller/shell.py
+++ b/src/controller/shell.py
@@ -1,8 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2015-2019 Intel Corporation
-from __future__ import absolute_import
-
import cmd
from .commands import bye
from .commands import pri
diff --git a/src/controller/shell_lib/common.py b/src/controller/shell_lib/common.py
index 447584b..4941bba 100644
--- a/src/controller/shell_lib/common.py
+++ b/src/controller/shell_lib/common.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017-2018 Nippon Telegraph and Telephone Corporation
diff --git a/src/controller/spp.py b/src/controller/spp.py
index a74209b..00ffd6f 100644
--- a/src/controller/spp.py
+++ b/src/controller/spp.py
@@ -1,9 +1,7 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2015-2016 Intel Corporation
-from __future__ import absolute_import
-
import argparse
import re
from .shell import Shell
diff --git a/src/controller/spp_common.py b/src/controller/spp_common.py
index 09a6b5a..6bf8b1f 100644
--- a/src/controller/spp_common.py
+++ b/src/controller/spp_common.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2015-2016 Intel Corporation
diff --git a/src/controller/spp_ctl_client.py b/src/controller/spp_ctl_client.py
index 50cbfae..3cce628 100644
--- a/src/controller/spp_ctl_client.py
+++ b/src/controller/spp_ctl_client.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Nippon Telegraph and Telephone Corporation
diff --git a/src/controller/websocket/spp_ws.py b/src/controller/websocket/spp_ws.py
index 848945a..de5feeb 100755
--- a/src/controller/websocket/spp_ws.py
+++ b/src/controller/websocket/spp_ws.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017-2018 Nippon Telegraph and Telephone Corporation
diff --git a/src/spp.py b/src/spp.py
index 62606e7..498fd2e 100755
--- a/src/spp.py
+++ b/src/spp.py
@@ -1,8 +1,7 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2015-2016 Intel Corporation
-from __future__ import absolute_import
from controller import spp
import sys
--
2.17.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [spp] [PATCH 2/3] project: update requirements.txt for pip3
2019-02-20 8:54 [spp] [PATCH 0/3] Remove Python2 support ogawa.yasufumi
2019-02-20 8:54 ` [spp] [PATCH 1/3] controller: remove python2 support ogawa.yasufumi
@ 2019-02-20 8:54 ` ogawa.yasufumi
2019-02-20 8:54 ` [spp] [PATCH 3/3] docs: remove python2 and pip instructions ogawa.yasufumi
2 siblings, 0 replies; 4+ messages in thread
From: ogawa.yasufumi @ 2019-02-20 8:54 UTC (permalink / raw)
To: spp, ferruh.yigit, ogawa.yasufumi
From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
As python2 support is removed, add packages install for SPP CLI and
docs.
* pyyaml
* tornado
* websocket-client
* sphinx-rtd-theme
Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
---
requirements.txt | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/requirements.txt b/requirements.txt
index 7d0b774..f31beb8 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -2,3 +2,11 @@
eventlet
bottle
netaddr
+
+# SPP CLI
+pyyaml
+tornado
+websocket-client
+
+# docs
+sphinx-rtd-theme
--
2.17.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [spp] [PATCH 3/3] docs: remove python2 and pip instructions
2019-02-20 8:54 [spp] [PATCH 0/3] Remove Python2 support ogawa.yasufumi
2019-02-20 8:54 ` [spp] [PATCH 1/3] controller: remove python2 support ogawa.yasufumi
2019-02-20 8:54 ` [spp] [PATCH 2/3] project: update requirements.txt for pip3 ogawa.yasufumi
@ 2019-02-20 8:54 ` ogawa.yasufumi
2 siblings, 0 replies; 4+ messages in thread
From: ogawa.yasufumi @ 2019-02-20 8:54 UTC (permalink / raw)
To: spp, ferruh.yigit, ogawa.yasufumi
From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
As python2 support is removed, remove instructions for installing
packages of python2 and pip.
Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
---
docs/guides/commands/experimental.rst | 31 ++++++++++++++++-----------
docs/guides/gsg/install.rst | 30 ++++++++++++++------------
docs/guides/gsg/setup.rst | 8 ++-----
requirements.txt | 1 +
4 files changed, 37 insertions(+), 33 deletions(-)
diff --git a/docs/guides/commands/experimental.rst b/docs/guides/commands/experimental.rst
index e649a05..576d11e 100644
--- a/docs/guides/commands/experimental.rst
+++ b/docs/guides/commands/experimental.rst
@@ -31,21 +31,26 @@ gfor generating topology file.
You can also generate a dot formatted file or image files supported by
graphviz.
-Here is a list of required tools for ``topo term`` command to output
-in terminal.
-MacOS is also supported optionally for which SPP controller
-runs on a remote host.
+Here is an example for installing required tools for ``topo term`` command
+to output in a terminal.
-* graphviz
-* imagemagick
-* libsixel-bin (for Ubuntu)
-* iTerm2 and imgcat (for MacOS)
+.. code-block:: console
+
+ $ sudo apt install graphviz \
+ imagemagick \
+ libsixel-bin
+
+MacOS is also supported optionally for using SPP CLI runs on a remote host.
+In this case, iTerm2 and imgcat are required.
-To output in browser with ``topo http`` command,
-install packages for websocket with pip or pip3.
+To output in browser with ``topo http`` command, install required packages
+by using ``requirements.txt`` as described in
+:ref:`install SPP<setup_install_spp>`, or only for them as follwoing.
+
+.. code-block:: console
-* tornado
-* websocket-client
+ $ pip3 install tornado \
+ websocket-client
Output to Terminal
@@ -159,7 +164,7 @@ for ``topo``.
.. code-block:: console
- spp > topo_subgraph [VERB] [LABEL] [RES_ID1,RES_ID2,...]
+ spp > topo_subgraph VERB LABEL RES_ID1,RES_ID2,...
Each of options are:
diff --git a/docs/guides/gsg/install.rst b/docs/guides/gsg/install.rst
index 0bb3401..9181734 100644
--- a/docs/guides/gsg/install.rst
+++ b/docs/guides/gsg/install.rst
@@ -14,6 +14,9 @@ Refer to `DPDK documentation
For Linux, see `Getting Started Guide for Linux
<http://www.dpdk.org/doc/guides/linux_gsg/index.html>`_ .
+
+.. _setup_install_dpdk:
+
DPDK
----
@@ -30,15 +33,13 @@ To compile DPDK, required to install libnuma-devel library.
$ sudo apt install libnuma-dev
-Python and pip are also required if not installed.
+Python3 and pip3 are also required if not installed.
.. code-block:: console
- # Python2
- $ sudo apt install python python-pip
-
# Python3
- $ sudo apt install python3 python3-pip
+ $ sudo apt install python3 \
+ python3-pip
Some of secondary processes depend on external libraries and you failed to
compile SPP without them.
@@ -50,9 +51,9 @@ it from the file.
.. code-block:: console
- $ sudo apt install libpcap-dev
- $ sudo apt install liblz4-dev
- $ sudo apt install liblz4-tool
+ $ sudo apt install libpcap-dev \
+ liblz4-dev \
+ liblz4-tool
``text2pcap`` is also required for creating pcap file which
is included in ``wireshark``.
@@ -82,6 +83,8 @@ Compile DPDK with target environment.
$ make install T=$RTE_TARGET
+.. _setup_install_spp:
+
SPP
---
@@ -117,7 +120,6 @@ You might fail to run ``pip3`` without sudo on some environments.
.. code-block:: console
- $ sudo apt update
$ pip3 install -r requirements.txt
@@ -263,16 +265,16 @@ For HTML documentation, install sphinx and additional theme.
.. code-block:: console
- $ pip install sphinx
- $ pip install sphinx-rtd-theme
+ $ pip install sphinx \
+ sphinx-rtd-theme
For PDF, inkscape and latex packages are required.
.. code-block:: console
- $ sudo apt install inkscape
- $ sudo apt install texlive-latex-extra
- $ sudo apt install texlive-latex-recommended
+ $ sudo apt install inkscape \
+ texlive-latex-extra \
+ texlive-latex-recommended
You might also need to install ``latexmk`` in addition to if you use
Ubuntu 18.04 LTS.
diff --git a/docs/guides/gsg/setup.rst b/docs/guides/gsg/setup.rst
index d4f9543..65cd156 100644
--- a/docs/guides/gsg/setup.rst
+++ b/docs/guides/gsg/setup.rst
@@ -245,12 +245,8 @@ Check your SELinux configuration.
Python 2 or 3 ?
---------------
-In SPP, Python3 is required only for running ``spp-ctl``. Other python scripts
-are able to be launched both of Python2 and 3.
-
-Howevrer, Python2 will not be maintained after 2020 and SPP is going to update
-only supporting Python3.
-In SPP, it is planned to support only Python3 before the end of 2019.
+In SPP, Python3 is required only for running ``spp-ctl`` and SPP CLI.
+Python2 is not supported anymore.
Reference
diff --git a/requirements.txt b/requirements.txt
index f31beb8..c8823c1 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -9,4 +9,5 @@ tornado
websocket-client
# docs
+sphinx
sphinx-rtd-theme
--
2.17.1
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-02-20 8:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-20 8:54 [spp] [PATCH 0/3] Remove Python2 support ogawa.yasufumi
2019-02-20 8:54 ` [spp] [PATCH 1/3] controller: remove python2 support ogawa.yasufumi
2019-02-20 8:54 ` [spp] [PATCH 2/3] project: update requirements.txt for pip3 ogawa.yasufumi
2019-02-20 8:54 ` [spp] [PATCH 3/3] docs: remove python2 and pip instructions ogawa.yasufumi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).