forked from percy/example-percy-selenium-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (24 loc) · 661 Bytes
/
Makefile
File metadata and controls
33 lines (24 loc) · 661 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
VENV=.venv/bin
NPM=node_modules/.bin
REQUIREMENTS=$(wildcard requirements.txt)
MARKER=.initialized-with-makefile
VENVDEPS=$(REQUIREMENTS setup.py)
NPMDEPS=$(package-lock.json)
$(VENV):
python -m venv .venv
$(VENV)/python -m pip install --upgrade pip
$(VENV)/$(MARKER): $(VENVDEPS) | $(VENV)
$(VENV)/pip install $(foreach path,$(REQUIREMENTS),-r $(path))
touch $(VENV)/$(MARKER)
$(NPM): $(NPMDEPS)
npm install
.PHONY: venv npm install clean serve test
venv: $(VENV)/$(MARKER)
npm: $(NPM)
install: npm venv
clean:
rm -rf $$(cat .gitignore)
serve:
$(VENV)/python -m http.server 8000
test: install
$(NPM)/percy exec -- $(VENV)/python tests/todo.py