-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathMakefile
74 lines (51 loc) · 1.25 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
66
67
68
69
70
71
72
73
74
#################
### EQL
#################
VENV := ./env/eql-build
VENV_BIN := $(VENV)/bin
PYTHON := $(VENV_BIN)/python
PIP := $(PYTHON) -m pip
SPHINXBUILD ?= $(VENV_BIN)/sphinx-build
$(VENV):
pip install virtualenv
virtualenv $(VENV)
$(PIP) install setuptools -U
$(PYTHON) setup.py install
.PHONY: clean
clean:
rm -rf $(VENV) *.egg-info .eggs *.egg htmlcov build dist .build .tmp .tox *.egg-info .coverage coverage.xml junit.xml .pytest_cache
find . -type f -name '*.pyc' -delete
find . -type f -name '__pycache__' -delete
.PHONY: testdeps
testdeps:
$(PIP) install eql[test]
.PHONY: pytest
pytest: $(VENV) testdeps
$(PYTHON) setup.py -q test
.PHONY: pylint
pylint: $(VENV) testdeps
$(PYTHON) setup.py -q lint
.PHONY: test
test: $(VENV) pylint pytest
.PHONY: sdist
sdist: $(VENV)
$(PYTHON) setup.py sdist
.PHONY: bdist_egg
bdist_egg: $(VENV)
$(PYTHON) setup.py bdist_egg
.PHONY: bdist_wheel
bdist_wheel: $(VENV)
$(PYTHON) setup.py bdist_wheel
.PHONY: install
install: $(VENV)
$(PYTHON) setup.py install
.PHONY: all
all: sdist
.PHONY: docs
docs: $(VENV) install
$(PIP) install sphinx sphinx_rtd_theme
cd docs && ../$(SPHINXBUILD) -M html . _build
.PHONY: upload
upload: $(VENV)
$(PIP) install twine~=1.13
$(VENV_BIN)/twine upload dist/*