summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 5a8dc1615bc54cf4eeafd39598fe327d8b4f995e (plain)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
PORT?=8008

install:
	sensible-browser "https://github.com/nicolargo/glances#installation"

venv-python:
	virtualenv -p /usr/bin/python3 venv

venv-dev:
	./venv/bin/pip install -r dev-requirements.txt
	./venv/bin/pip install -r doc-requirements.txt

venv-dev-upgrade:
	./venv/bin/pip install --upgrade -r dev-requirements.txt
	./venv/bin/pip install --upgrade -r doc-requirements.txt

venv:
	./venv/bin/pip install -r requirements.txt
	./venv/bin/pip install -r optional-requirements.txt

venv-upgrade:
	./venv/bin/pip install --upgrade -r dev-requirements.txt
	./venv/bin/pip install --upgrade -r requirements.txt
	./venv/bin/pip install --upgrade -r optional-requirements.txt

test:
	./unitest-all.sh

docs: venv-dev
	cd docs && ./build.sh

docs-server: docs
	(sleep 2 && sensible-browser "http://localhost:$(PORT)") &
	cd docs/_build/html/ && ./venv/bin/python -m SimpleHTTPServer $(PORT)

webui: venv-dev
	cd glances/outputs/static/ && npm install && npm audit fix && npm run build

run: venv
	./venv/bin/python -m glances -C ./conf/glances.conf

run-debug: venv
	./venv/bin/python -m glances -C ./conf/glances.conf -d

run-webserver: venv
	./venv/bin/python -m glances -C ./conf/glances.conf -w

run-server: venv
	./venv/bin/python -m glances -C ./conf/glances.conf -s

run-client: venv
	./venv/bin/python -m glances -C ./conf/glances.conf -c localhost

profiling: venv venv-dev
	@echo "Please complete and run: sudo ./venv/bin/py-spy record -o ./docs/_static/glances-flame.svg -d 60 -s --pid <GLANCES PID>"

.PHONY: test docs docs-server