Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .PHONY: all
- all: tests
- .PHONY: tests
- tests: py_env
- bash -c 'source py_env/bin/activate && py.test tests'
- py_env: requirements_dev.txt setup.py
- rm -rf py_env
- virtualenv py_env
- bash -c 'source py_env/bin/activate && pip install -r requirements_dev.txt'
- # Makefile
- .PHONY: all
- all: tests
- .PHONY: tests
- tests:
- tox
- # tox.ini
- [tox]
- project = my_project
- envlist = py26,py27
- [testenv]
- install_command = pip install --use-wheel {opts} {packages}
- deps = -rrequirements_dev.txt
- commands =
- py.test {posargs:tests}
- REBUILD_FLAG =
- .PHONY: all
- all: tests
- .PHONY: tests
- tests: .venv.touch
- tox $(REBUILD_FLAG)
- .venv.touch: setup.py requirements.txt requirements_dev.txt
- $(eval REBUILD_FLAG := --recreate)
- touch .venv.touch
- $ make tests
- touch .venv.touch
- tox --recreate
- [[ SNIP ]]
- $ make tests
- tox
- [[ SNIP ]]
- $ touch requirements.txt
- $ make tests
- touch .venv.touch
- tox --recreate
- [[ SNIP ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement