Update docs and scripts for using python3

Python2 is deprecated so we need to switch to python3

Change-Id: Id9158df88f0b6ed0c071994bf0aa240063ac6761
This commit is contained in:
Hongbin Lu
2020-02-17 04:45:44 +00:00
parent 97266ff5b9
commit d9523c7afe
5 changed files with 11 additions and 11 deletions

View File

@@ -167,7 +167,7 @@ Install prerequisites
::
$ sudo pip install -r requirements.txt
$ sudo pip3 install -r requirements.txt
Installing Kuryr's libnetwork driver
@@ -175,7 +175,7 @@ Installing Kuryr's libnetwork driver
Running the following will grab the requirements and install kuryr::
$ sudo pip install .
$ sudo pip3 install .
Configuring Kuryr
@@ -415,12 +415,12 @@ Generating Documentation
We use `Sphinx <https://pypi.org/project/Sphinx>`_ to maintain the
documentation. You can install Sphinx using pip::
$ pip install -U Sphinx
$ pip3 install -U Sphinx
In addition to Sphinx you will also need the following requirements
(not covered by `requirements.txt`)::
$ pip install openstackdocstheme reno 'reno[sphinx]'
$ pip3 install openstackdocstheme reno 'reno[sphinx]'
The source code of the documentation are under *doc*, you can generate the
html files using the following command. If the generation succeeds,a
@@ -433,7 +433,7 @@ Now you can serve the documentation at http://localhost:8080 as a simple
website::
$ cd build/html
$ python -m SimpleHTTPServer 8080
$ python3 -m SimpleHTTPServer 8080
Limitations
-----------

View File

@@ -74,7 +74,7 @@ function configure_kuryr {
# main loop
if is_service_enabled kuryr-libnetwork; then
DISTRO_DISTUTILS_DATA_PATH=$(python -c "import distutils.dist;import distutils.command.install;inst = distutils.command.install.install(distutils.dist.Distribution());inst.finalize_options();print inst.install_data")
DISTRO_DISTUTILS_DATA_PATH=$(python3 -c "import distutils.dist;import distutils.command.install;inst = distutils.command.install.install(distutils.dist.Distribution());inst.finalize_options();print(inst.install_data)")
if [[ "$1" == "stack" && "$2" == "install" ]]; then
# Install kuryr-lib from git so we make sure we're testing
# the latest code.

View File

@@ -39,13 +39,13 @@ Install and configure components
.. code-block:: console
# apt-get install python-pip
# apt-get install python3-pip
# cd /var/lib/kuryr
# git clone -b master https://git.openstack.org/openstack/kuryr-libnetwork.git
# chown -R kuryr:kuryr kuryr-libnetwork
# cd kuryr-libnetwork
# pip install -r requirements.txt
# python setup.py install
# pip3 install -r requirements.txt
# python3 setup.py install
#. Generate a sample configuration file:

View File

@@ -105,5 +105,5 @@ if [[ $KURYR_USE_UWSGI == "True" ]]; then
--threads "$KURYR_UWSGI_THREADS" \
"${UWSGI_ADDITIONAL_ARGS[@]}"
else
PYTHONPATH="${KURYR_HOME}" python "${KURYR_HOME}/scripts/run_server.py" --config-file "${KURYR_CONFIG}" "$@"
PYTHONPATH="${KURYR_HOME}" python3 "${KURYR_HOME}/scripts/run_server.py" --config-file "${KURYR_CONFIG}" "$@"
fi

View File

@@ -27,7 +27,7 @@ prerequisites() (
if ! [ -f "${DIST_PATH}/kuryr_libnetwork.egg-info/entry_points.txt" ]; then
curr_dir=$(pwd)
cd "${DIST_PATH}"
python setup.py egg_info # Generate entrypoints for config generation
python3 setup.py egg_info # Generate entrypoints for config generation
cd "${curr_dir}"
fi