-
Notifications
You must be signed in to change notification settings - Fork 53
/
Copy pathMakefile
65 lines (43 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
PYTHON = python3
PIP = pip3
EXAMPLES_DIR = examples
SIMULAQRON_DIR = simulaqron
TEST_DIR = tests
RESET_FILE = ${SIMULAQRON_DIR}/toolbox/reset.py
clean: _delete_pyc _delete_pid _clear_build _reset
_delete_pyc:
@find . -name '*.pyc' -delete
_delete_pid:
@find ${SIMULAQRON_DIR} -name '*.pid' -delete
lint:
@${PYTHON} -m flake8 ${SIMULAQRON_DIR} ${EXAMPLES_DIR} ${TEST_DIR}
test-deps:
@${PYTHON} -m pip install -r test_requirements.txt
requirements python-deps:
@cat requirements.txt | xargs -n 1 -L 1 $(PIP) install
install-optional: install
@cat optional-requirements.txt | xargs -n 1 -L 1 $(PIP) install
_reset:
@${PYTHON} ${RESET_FILE}
_tests:
@${PYTHON} -m pytest ${TEST_DIR}/quick
tests: _tests _reset
_tests_all:
@${PYTHON} -m pytest ${TEST_DIR}
tests_all: _tests_all _reset
install: test-deps
@$(PYTHON) -m pip install -e . ${PIP_FLAGS}
_verified:
@echo "SimulaQron is verified!"
verify: clean python-deps lint tests _verified
_remove_build:
@rm -f -r build
_remove_dist:
@rm -f -r dist
_remove_egg_info:
@rm -f -r simulaqron.egg-info
_clear_build: _remove_build _remove_dist _remove_egg_info
_build:
@${PYTHON} setup.py sdist bdist_wheel
build: _clear_build _build
.PHONY: clean lint python-deps tests full_tests verify build