From 3111f250640b2f0364bd62104416ada41098b280 Mon Sep 17 00:00:00 2001 From: Peter Mikus Date: Fri, 13 Dec 2019 12:49:21 +0000 Subject: FIX PIP requirement packages + CSIT will only use packages installed from master PIP requirement.txt file + All CSIT subsequent code must use single function and PIP list for virtualenv - Report/PAL/doc/trending will follow in next patch Change-Id: Ia9150fb05a144182a5a163178d553370ede55cdd Signed-off-by: Peter Mikus --- requirements.txt | 4 +++- resources/libraries/bash/function/common.sh | 2 +- resources/libraries/bash/function/per_patch.sh | 4 ---- resources/tools/disk-image-builder/csit-sut/Dockerfile | 4 ++-- resources/tools/scripts/perpatch_requirements.txt | 15 --------------- 5 files changed, 6 insertions(+), 23 deletions(-) delete mode 100644 resources/tools/scripts/perpatch_requirements.txt diff --git a/requirements.txt b/requirements.txt index 3a29c6d023..8c0928206e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -45,6 +45,9 @@ sphinx-rtd-theme==0.4.0 sphinxcontrib-programoutput==0.15 sphinxcontrib-robotdoc==0.11.0 +# VPP requirements +ply==3.11 + # PIP freeze dependencies alabaster==0.7.12 Babel==2.7.0 @@ -61,7 +64,6 @@ Jinja2==2.10.3 MarkupSafe==1.1.1 packaging==19.2 pbr==5.4.3 -ply==3.11 pycparser==2.19 Pygments==2.4.2 PyNaCl==1.3.0 diff --git a/resources/libraries/bash/function/common.sh b/resources/libraries/bash/function/common.sh index f3e86164e1..eb7cee970e 100644 --- a/resources/libraries/bash/function/common.sh +++ b/resources/libraries/bash/function/common.sh @@ -119,7 +119,7 @@ function activate_virtualenv () { pip3 install --upgrade virtualenv || { die "Virtualenv package install failed." } - virtualenv -p $(which python3) "${env_dir}" || { + virtualenv --python=$(which python3) "${env_dir}" || { die "Virtualenv creation for $(which python3) failed." } set +u diff --git a/resources/libraries/bash/function/per_patch.sh b/resources/libraries/bash/function/per_patch.sh index ea7ea4f837..abf2cac688 100644 --- a/resources/libraries/bash/function/per_patch.sh +++ b/resources/libraries/bash/function/per_patch.sh @@ -108,10 +108,6 @@ function compare_test_results () { set -exuo pipefail cd "${VPP_DIR}" || die "Change directory operation failed." - # Ply is installed as system level package, but not seen for some reason. - pip3 install -r "${PYTHON_SCRIPTS_DIR}/perpatch_requirements.txt" || { - die "Compare script Python requirements installation failed." - } # Reusing CSIT main virtualenv. python3 "${TOOLS_DIR}/integrated/compare_perpatch.py" # The exit code determines the vote result. diff --git a/resources/tools/disk-image-builder/csit-sut/Dockerfile b/resources/tools/disk-image-builder/csit-sut/Dockerfile index ba212dc960..aa5ddf288d 100644 --- a/resources/tools/disk-image-builder/csit-sut/Dockerfile +++ b/resources/tools/disk-image-builder/csit-sut/Dockerfile @@ -14,7 +14,7 @@ FROM ubuntu:18.04 MAINTAINER csit-dev LABEL Description="CSIT vpp-device ubuntu 18.04 SUT image" -LABEL Version="0.7" +LABEL Version="1.0" # Setup the environment ENV DEBIAN_FRONTEND=noninteractive @@ -57,7 +57,6 @@ RUN apt-get -q update \ python-cffi \ python-cffi-backend \ python-dev \ - python-enum34 \ python-pip \ python-setuptools \ python-virtualenv \ @@ -115,6 +114,7 @@ RUN pip3 install \ scapy==2.4.3 \ scp==0.13.2 \ ansible==2.7.8 \ + ply==3.11 \ dill==0.2.8.2 \ numpy==1.17.3 \ hdrhistogram==0.6.1 \ diff --git a/resources/tools/scripts/perpatch_requirements.txt b/resources/tools/scripts/perpatch_requirements.txt deleted file mode 100644 index 2275fb82f2..0000000000 --- a/resources/tools/scripts/perpatch_requirements.txt +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) 2019 Cisco and/or its affiliates. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at: -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# TODO: Ply should be installed as system package, fix bootstrap to see it. -ply==3.11 -- cgit 1.2.3-korg