Skip to content

Instantly share code, notes, and snippets.

@stollcri
Last active August 23, 2016 15:28
Show Gist options
  • Save stollcri/57110a78f63843db7322832803e4f86d to your computer and use it in GitHub Desktop.
Save stollcri/57110a78f63843db7322832803e4f86d to your computer and use it in GitHub Desktop.
Make file macro function to perform pip install
# vim: set syntax=Makefile
# define at top of file
define PIP_INSTALL
@if [ ! $(shell echo ${VIRTUAL_ENV}) ]; then \
set +o nounset; \
source ${VIRTUALENVPATH}/bin/activate; \
set -o nounset; \
fi; \
cd external-code/ && pip install $1
endef
sprint: upsgrade-pip
$(call PIP_INSTALL,-r requirements.txt --exists-action w -r requirements-sprint.txt)
install-jobs: upsgrade-pip
$(call PIP_INSTALL,-r requirements.txt -r requirements-release.txt)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment