Skip to content

Commit 2bfb85e

Browse files
committed
Rebuild virtualenv on requirements change.
1 parent 969170b commit 2bfb85e

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
.project
99
.pydevproject
1010
.tox
11+
.venv.touch
1112
/venv*
1213
coverage-html
1314
dist

Makefile

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,27 @@
1+
2+
REBUILD_FLAG =
3+
14
.PHONY: all
25
all: venv test
36

47
.PHONY: venv
5-
venv:
6-
tox -e venv
8+
venv: .venv.touch
9+
tox -e venv $(REBUILD_FLAG)
710

811
.PHONY: tests test
912
tests: test
10-
test:
11-
tox
13+
test: .venv.touch
14+
tox $(REBUILD_FLAG)
15+
16+
17+
.venv.touch: setup.py requirements.txt requirements_dev.txt
18+
$(eval REBUILD_FLAG := --recreate)
19+
touch .venv.touch
20+
1221

1322
.PHONY: clean
1423
clean:
1524
find . -iname '*.pyc' | xargs rm -f
1625
rm -rf .tox
1726
rm -rf ./venv-*
27+
rm -f .venv.touch

0 commit comments

Comments
 (0)