dragonflow/tools/tox_install.sh

30 lines
815 B
Bash
Executable File

#!/usr/bin/env bash
# Many of neutron's repos suffer from the problem of depending on neutron,
# but it not existing on pypi.
# Note: neutron now does exist, others not yet.
# This wrapper for tox's package installer will use the existing package
# if it exists, else use zuul-cloner if that program exists, else grab it
# from neutron master via a hard-coded URL. That last case should only
# happen with devs running unit tests locally.
# From the tox.ini config page:
# install_command=ARGV
# default:
# pip install {opts} {packages}
set -ex
DIR=$(dirname $0)
${DIR}/tox_install_project.sh networking-sfc networking_sfc $*
CONSTRAINTS_FILE=$1
shift
install_cmd="pip install"
if [ $CONSTRAINTS_FILE != "unconstrained" ]; then
install_cmd="$install_cmd -c$CONSTRAINTS_FILE"
fi
$install_cmd -U $*
exit $?