-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathMakefile
43 lines (32 loc) · 1.27 KB
/
Makefile
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
34
35
36
37
38
39
40
41
42
43
# define the name of the virtual environment directory
VENV := venv
all: venv docs/index.html server
venv: $(VENV)/bin/activate
flask:
./$(VENV)/bin/pip install flask
./$(VENV)/bin/python3 integration_tests/flask_test.py
docs/index.html: src/pyvibe/__init.py___ generator/generate.py
./$(VENV)/bin/pip install pandas
./$(VENV)/bin/pip install plotly
./$(VENV)/bin/python3 generator/generate.py
# pdoc: src/pyvibe/__init.py___
# ./$(VENV)/bin/pip install pdoc
# ./$(VENV)/bin/pdoc pyvibe --logo https://cdn.pycob.com/pycob_hex.png --logo-link https://www.pyvibe.com --no-show-source -e pycob=https://github.com/pycob/pyvibe/tree/main/src/pyvibe/ -n --docformat google -o docs/pdoc/
# Build init.py when generate.swift changes
src/pyvibe/__init.py___: generator/generate.swift
swift generator/generate.swift
# Rebuild the virtual environment when init.py changes
$(VENV)/bin/activate: src/pyvibe/__init.py___
python3 -m venv $(VENV)
./$(VENV)/bin/pip install --upgrade pip
./$(VENV)/bin/pip install .
screenshot:
./$(VENV)/bin/pip install selenium
sudo ./$(VENV)/bin/python3 generator/screenshot.py
server:
open http://localhost:8000
./$(VENV)/bin/python -m http.server -d docs
clean:
rm -rf $(VENV)
find . -type f -name '*.pyc' -delete
.PHONY: all clean flask screenshot server