From 133a69ae9037497ca6f4b67c20be413b6a08b440 Mon Sep 17 00:00:00 2001 From: Kobi Samoray Date: Sun, 10 Nov 2019 12:05:11 +0200 Subject: [PATCH] Python3 support - use correct pip Use pip3 while python3 is in use Change-Id: I5d1eb2249b881aefdf1130bd9af00dea9d699bea --- devstack/lib/nsx_common | 6 +++--- devstack/plugin.sh | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/devstack/lib/nsx_common b/devstack/lib/nsx_common index effeaccc3f..d25d974f6e 100644 --- a/devstack/lib/nsx_common +++ b/devstack/lib/nsx_common @@ -43,7 +43,7 @@ function install_neutron_projects { elif use_library_from_git $pkg; then echo "Project $pkg enabled explicitly from LIBS_FROM_GIT" else - sudo -H pip install -e "git+https://opendev.org/openstack/${pkg}@${NEUTRON_BRANCH}#egg=${pkg_renamed}" + sudo -H ${PIP} install -e "git+https://opendev.org/openstack/${pkg}@${NEUTRON_BRANCH}#egg=${pkg_renamed}" sudo chown -R ${USER}:${USER} src/${pkg} fi done @@ -55,7 +55,7 @@ function install_neutron_projects { if is_service_enabled neutron; then echo "service Neutron is enabled explicitly by devstack" else - sudo -H pip install -e "git+https://opendev.org/openstack/neutron@${NEUTRON_BRANCH}#egg=neutron" + sudo -H ${PIP} install -e "git+https://opendev.org/openstack/neutron@${NEUTRON_BRANCH}#egg=neutron" sudo chown -R ${USER}:${USER} src/neutron fi @@ -66,7 +66,7 @@ function install_neutron_projects { if is_service_enabled octavia; then echo "service octavia is enabled explicitly by devstack" else - sudo -H pip install -e "git+https://opendev.org/openstack/octavia@${NEUTRON_BRANCH}#egg=octavia" + sudo -H ${PIP} install -e "git+https://opendev.org/openstack/octavia@${NEUTRON_BRANCH}#egg=octavia" sudo chown -R ${USER}:${USER} src/octavia fi } diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 2bb7e2cd61..022e795e73 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -22,8 +22,10 @@ GITREPO['vmware-nsxlib']=${NSXLIB_REPO:-${GIT_BASE}/openstack/vmware-nsxlib.git} GITBRANCH['vmware-nsxlib']=${NSXLIB_BRANCH:-master} PYTHON='python' +PIP='pip' if [[ $USE_PYTHON3 == "True" ]]; then PYTHON='python3' + PIP='pip3' fi dir=${GITDIR['vmware-nsx']}/devstack