forked from emcache/emcache
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
65 lines (45 loc) · 1.17 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 ?= python
PIP ?= pip
CYTHON ?= cython
_default: compile
clean:
rm -fr emcache/_cython/*.c emcache/_cython/*.so build dist
find . -name '__pycache__' | xargs rm -rf
find . -type f -name "*.pyc" -delete
.install-cython:
$(PIP) install Cython==0.29.18
touch .install-cython
emcache/_cython/cyemcache.c: emcache/_cython/cyemcache.pyx
$(CYTHON) -3 -o $@ $< -I emcache
cythonize: .install-cython emcache/_cython/cyemcache.c
setup-build:
$(PYTHON) setup.py build_ext --inplace
compile: clean cythonize setup-build
install-dev: compile
$(PIP) install -e ".[dev]"
install: compile
$(PIP) install -e .
format:
isort --recursive .
black .
lint:
isort --check-only --recursive .
black --check .
flake8
acceptance:
pytest -sv tests/acceptance
unit:
pytest -sv tests/unit
test:
pytest -sv tests
coverage:
coverage run -m pytest -v tests/ --junitxml=build/test.xml
coverage xml -i -o build/coverage.xml
coverage report
stress:
$(PYTHON) benchmark/sets_gets_stress.py --duration 10 --concurrency 32
install-doc:
$(PIP) install -r docs/requirements.txt
doc:
make -C docs/ html
.PHONY: clean setup-build install install-dev compile unit test acceptance stress