Skip to content

Instantly share code, notes, and snippets.

@wooken
Created July 22, 2016 20:04
Show Gist options
  • Save wooken/a4baa2baa62c237f232d8b80b7183eb0 to your computer and use it in GitHub Desktop.
Save wooken/a4baa2baa62c237f232d8b80b7183eb0 to your computer and use it in GitHub Desktop.
Makefile - Python virtualenv
VENV=venv
VENV_PYTHON_BIN=venv/bin/python
PIP_REQ=requirements.txt
.PHONY: example
example:
$(VENV_PYTHON_BIN) script.py
venv: $(PIP_REQ)
[ -d $(VENV) ] || virtualenv $(VENV)
$(VENV)/bin/pip install -Ur $(PIP_REQ)
touch $(VENV)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment