Skip to content

Instantly share code, notes, and snippets.

@tbreeds
Created November 8, 2016 02:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tbreeds/09c87ff4e08b2095712ea5ac4070165b to your computer and use it in GitHub Desktop.
Save tbreeds/09c87ff4e08b2095712ea5ac4070165b to your computer and use it in GitHub Desktop.
#!/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.
BRANCH_NAME=XXX
CLIENT_NAME=XXX
set -e
CONSTRAINTS_FILE=$1
shift
localfile="${VIRTUAL_ENV}/upper-constraints.txt"
if [[ $CONSTRAINTS_FILE != http* ]]; then
CONSTRAINTS_FILE=file://$CONSTRAINTS_FILE
fi
curl $CONSTRAINTS_FILE -k -o $localfile
sed -i~ -e "/^${CLIENT_NAME}===/d" $localfile
pip install -U -c$localfile $*
exit $?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment