Skip to content

Commit 8a39211

Browse files
authored
Makefile: use virtualenv in build/venv (pytest-dev#486)
1 parent a629d12 commit 8a39211

File tree

2 files changed

+14
-17
lines changed

2 files changed

+14
-17
lines changed

.gitignore

-5
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ _build
1010
/.coverage.*
1111
/.coverage
1212
/htmlcov/
13-
/bin/
14-
/include/
15-
/lib/
16-
/src/
17-
/share/
1813
.cache
1914
.Python
2015
.eggs

Makefile

+14-12
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
11
.PHONY: docs test clean isort
22

3+
VENV:=build/venv
4+
35
export DJANGO_SETTINGS_MODULE?=pytest_django_test.settings_sqlite_file
46

5-
testenv: bin/py.test
7+
testenv: $(VENV)/bin/pytest
68

7-
test: bin/py.test
8-
bin/pip install -e .
9-
bin/py.test
9+
test: $(VENV)/bin/pytest
10+
$(VENV)/bin/pip install -e .
11+
$(VENV)/bin/py.test
1012

11-
bin/python bin/pip:
12-
virtualenv .
13+
$(VENV)/bin/python $(VENV)/bin/pip:
14+
virtualenv $(VENV)
1315

14-
bin/py.test: bin/python requirements.txt
15-
bin/pip install -Ur requirements.txt
16+
$(VENV)/bin/pytest: $(VENV)/bin/python requirements.txt
17+
$(VENV)/bin/pip install -Ur requirements.txt
1618
touch $@
1719

18-
bin/sphinx-build: bin/pip
19-
bin/pip install sphinx
20+
$(VENV)/bin/sphinx-build: $(VENV)/bin/pip
21+
$(VENV)/bin/pip install sphinx
2022

21-
docs: bin/sphinx-build
22-
SPHINXBUILD=../bin/sphinx-build $(MAKE) -C docs html
23+
docs: $(VENV)/bin/sphinx-build
24+
SPHINXBUILD=../$(VENV)/bin/sphinx-build $(MAKE) -C docs html
2325

2426
# See setup.cfg for configuration.
2527
isort:

0 commit comments

Comments
 (0)