Skip to content

Instantly share code, notes, and snippets.

@vmalloc
Last active December 19, 2015 15:08
Show Gist options
  • Save vmalloc/5973734 to your computer and use it in GitHub Desktop.
Save vmalloc/5973734 to your computer and use it in GitHub Desktop.
Quick wrapper for experimenting with python packages in a temporary virtualenv using devpi
#! /bin/bash -x -e
## Example usage:
# $ ./experiment_with numpy matplotlib
UUID=`echo $* | sha1sum | awk '{print $1}'`
VENV_DIR=/tmp/temp_venv_$UUID
devpi use
if [[ ! -d ${VENV_DIR} ]]; then
virtualenv --no-site-packages ${VENV_DIR}
for x in ipython $*; do
${VENV_DIR}/bin/pip install -U -i http://localhost:3141/root/dev/+simple $x
done
fi
${VENV_DIR}/bin/ipython
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment