Commit e1b352bc authored by Charles Ferguson's avatar Charles Ferguson
Browse files

Update scripts for CI.

parent 155263c0
...@@ -79,6 +79,7 @@ if [[ $# -lt $((OPTIND+1)) ]] ; then ...@@ -79,6 +79,7 @@ if [[ $# -lt $((OPTIND+1)) ]] ; then
exit 1 exit 1
fi fi
scriptdir=$( normalize "$(dirname "${BASH_SOURCE[0]}")" )
environment="${*:$OPTIND:1}" environment="${*:$OPTIND:1}"
# Our temporary requirements file # Our temporary requirements file
...@@ -103,7 +104,7 @@ environment=$( normalize "${environment}" ) ...@@ -103,7 +104,7 @@ environment=$( normalize "${environment}" )
source "${environment}/bin/activate" || exit 1 source "${environment}/bin/activate" || exit 1
echo Installing packages with PIP ... echo Installing packages into virtualenv with PIP ...
if ! "${pip_tool}" install \ if ! "${pip_tool}" install \
--disable-pip-version-check \ --disable-pip-version-check \
${quiet:-} \ ${quiet:-} \
...@@ -116,9 +117,14 @@ echo Checking for any packages that are not in the requirements... ...@@ -116,9 +117,14 @@ echo Checking for any packages that are not in the requirements...
# The echos in the second argument ensure that PIP and Easy_Install are not removed # The echos in the second argument ensure that PIP and Easy_Install are not removed
# from the virtualenv. # from the virtualenv.
to_remove=($(diff <("${pip_tool}" list --disable-pip-version-check | cut -d' ' -f 1 | sort) \ to_remove=($(diff <("${pip_tool}" list --disable-pip-version-check | cut -d' ' -f 1 | sort) \
<((echo pip ; echo setuptools; cut -d'=' -f 1 "${tmprequirements}") | sort) \ <((if [ -e "${scriptdir}/requirements-venv.txt" ] ; then \
| grep '^<' \ cat "${scriptdir}/requirements-venv.txt" ; \
| cut -d' ' -f2)) else \
echo pip ; echo setuptools ; \
fi ; \
cut -d'=' -f 1 "${tmprequirements}") | sort) \
| grep '^<' \
| cut -d' ' -f2))
if [[ "${#to_remove[@]}" != 0 ]] ; then if [[ "${#to_remove[@]}" != 0 ]] ; then
echo " - removing ${#to_remove[@]} packages" echo " - removing ${#to_remove[@]} packages"
if ! "${pip_tool}" uninstall --disable-pip-version-check \ if ! "${pip_tool}" uninstall --disable-pip-version-check \
......
...@@ -10,7 +10,7 @@ ROOT="$SCRIPTS/.." ...@@ -10,7 +10,7 @@ ROOT="$SCRIPTS/.."
# Set up and enter the Virtual env. # Set up and enter the Virtual env.
"$SCRIPTS/bootstrap-env" "$ROOT/${VENV_DIR}" \ "$SCRIPTS/bootstrap-env" "$ROOT/${VENV_DIR}" \
"$ROOT/requirements.txt" \ "$ROOT/requirements.txt" \
"$SCRIPTS/requirements-docs.txt" "$SCRIPTS/requirements-docs.txt" || exit 1
cd "$ROOT" cd "$ROOT"
source "${VENV_DIR}/bin/activate" || exit 1 source "${VENV_DIR}/bin/activate" || exit 1
......
...@@ -10,7 +10,7 @@ ROOT="$SCRIPTS/.." ...@@ -10,7 +10,7 @@ ROOT="$SCRIPTS/.."
# Set up and enter the Virtual env. # Set up and enter the Virtual env.
"$SCRIPTS/bootstrap-env" "$ROOT/${VENV_DIR}" \ "$SCRIPTS/bootstrap-env" "$ROOT/${VENV_DIR}" \
"$ROOT/requirements.txt" \ "$ROOT/requirements.txt" \
"$SCRIPTS/requirements-lint.txt" "$SCRIPTS/requirements-lint.txt" || exit 1
cd "$ROOT" cd "$ROOT"
source "${VENV_DIR}/bin/activate" || exit 1 source "${VENV_DIR}/bin/activate" || exit 1
......
# Allow our testing # Allow our testing
coverage==4.1
nose==1.3.7 nose==1.3.7
psutil==4.3.0 psutil==4.3.0
......
...@@ -2,3 +2,4 @@ ...@@ -2,3 +2,4 @@
coverage==4.1 coverage==4.1
nose==1.3.7 nose==1.3.7
psutil==4.3.0 psutil==4.3.0
# VirtualEnv requirements
pip
setuptools
wheel
appdirs
packaging
pyparsing
six
...@@ -20,7 +20,7 @@ fi ...@@ -20,7 +20,7 @@ fi
# Set up and enter the Virtual env. # Set up and enter the Virtual env.
"$SCRIPTS/bootstrap-env" ${PYTHON_SWITCH} "$ROOT/${VENV_DIR}" \ "$SCRIPTS/bootstrap-env" ${PYTHON_SWITCH} "$ROOT/${VENV_DIR}" \
"$ROOT/requirements.txt" \ "$ROOT/requirements.txt" \
"$SCRIPTS/requirements-test.txt" "$SCRIPTS/requirements-test.txt" || exit 1
cd "$ROOT" cd "$ROOT"
source "${VENV_DIR}/bin/activate" || exit 1 source "${VENV_DIR}/bin/activate" || exit 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment