diff options
author | Zhaoxing <meng.zhaoxing1@zte.com.cn> | 2017-07-19 07:24:51 +0800 |
---|---|---|
committer | Zhaoxing <meng.zhaoxing1@zte.com.cn> | 2017-07-19 07:45:28 +0800 |
commit | db87c4f77a730e571338c2bf7bfcc9fdc5272185 (patch) | |
tree | 54504cabbb5d319403edc8d123e39f437d2f331a /nfvparser/src/main/python/tools/tox_install.sh | |
parent | 1a112663a18408161787f78f01d354a33f070957 (diff) |
init nfvparser code
Change-Id: I8e264c87777e36c4a42f0aa42ab4ae66a1d59a0b
Signed-off-by: Zhaoxing <meng.zhaoxing1@zte.com.cn>
Diffstat (limited to 'nfvparser/src/main/python/tools/tox_install.sh')
-rw-r--r-- | nfvparser/src/main/python/tools/tox_install.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/nfvparser/src/main/python/tools/tox_install.sh b/nfvparser/src/main/python/tools/tox_install.sh new file mode 100644 index 0000000..e61b63a --- /dev/null +++ b/nfvparser/src/main/python/tools/tox_install.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +# Client constraint file contains this client version pin that is in conflict +# with installing the client from source. We should remove the version pin in +# the constraints file before applying it for from-source installation. + +CONSTRAINTS_FILE="$1" +shift 1 + +set -e + +# NOTE(tonyb): Place this in the tox enviroment's log dir so it will get +# published to logs.openstack.org for easy debugging. +localfile="$VIRTUAL_ENV/log/upper-constraints.txt" + +if [[ "$CONSTRAINTS_FILE" != http* ]]; then + CONSTRAINTS_FILE="file://$CONSTRAINTS_FILE" +fi +# NOTE(tonyb): need to add curl to bindep.txt if the project supports bindep +curl "$CONSTRAINTS_FILE" --insecure --progress-bar --output "$localfile" + +pip install -c"$localfile" openstack-requirements + +# This is the main purpose of the script: Allow local installation of +# the current repo. It is listed in constraints file and thus any +# install will be constrained and we need to unconstrain it. +edit-constraints "$localfile" -- "$CLIENT_NAME" + +pip install -c"$localfile" -U "$@" +exit $? |