Consolidate all py2 and py3 requirements into a single requirements.txt
file for each and pip install them in a single `pip install`. The
problem with running multiple pip installs separately is that Python
dependency resolution will not take into account previous pip installs
and can break package dependencies. Crafting a requirements.txt and
installing all packages at the same time allows pip to ensure that
all packages are installed together with dependency versions that
statisfy all requirements.
Now that only Python 3 is supported we can combine everything into a
single requirements.txt file.
Change-Id: I020ac24da62301c2d99645d5adae9b45f642cb75
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
##############################################################################
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
##############################################################################
+# vim: sw=4 ts=4 sts=4 et ft=sh :
ROBOT_VENV="/tmp/v/robot"
echo ROBOT_VENV="${ROBOT_VENV}" >> "${WORKSPACE}/env.properties"
ROBOT_VENV="/tmp/v/robot"
echo ROBOT_VENV="${ROBOT_VENV}" >> "${WORKSPACE}/env.properties"
set -exu
# Make sure pip itself us up-to-date.
set -exu
# Make sure pip itself us up-to-date.
-pip install --upgrade pip
-python3 -m pip install --user --upgrade pip
+python -m pip install --upgrade pip
-pip install --upgrade docker-py importlib requests scapy netifaces netaddr ipaddr pyhocon
-pip install --upgrade robotframework-httplibrary \
- requests==2.15.1 \
- robotframework-requests \
- robotframework-sshlibrary==3.1.1 \
- robotframework-selenium2library
+echo "Installing Python Requirements"
+cat << 'EOF' > "requirements.txt"
+docker-py
+importlib
+ipaddr
+netaddr
+netifaces
+pyhocon
+requests
+robotframework-httplibrary
+robotframework-pycurllibrary
+robotframework-requests
+robotframework-selenium2library
+robotframework-sshlibrary==3.1.1
+scapy
# Module jsonpath is needed by current AAA idmlite suite.
# Module jsonpath is needed by current AAA idmlite suite.
-pip install --upgrade jsonpath-rw
# Modules for longevity framework robot library
# Modules for longevity framework robot library
-pip install --upgrade elasticsearch elasticsearch-dsl
+elasticsearch
+elasticsearch-dsl
# Module for pyangbind used by lispflowmapping project
# Module for pyangbind used by lispflowmapping project
-pip install --upgrade pyangbind
# Module for iso8601 datetime format
# Module for iso8601 datetime format
-pip install --upgrade isodate
# Module for TemplatedRequests.robot library
# Module for TemplatedRequests.robot library
-pip install --upgrade jmespath
# Module for backup-restore support library
# Module for backup-restore support library
-pip install --upgrade jsonpatch
# odltools for extra debugging
# odltools for extra debugging
+odltools
+EOF
+python -m pip install -r requirements.txt
-
-# Print installed versions.
-
-# vim: sw=4 ts=4 sts=4 et ft=sh :