forked from aquasecurity/kube-hunter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
67 lines (52 loc) · 1.22 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
.SILENT: clean
NAME := kube-hunter
SRC := kube_hunter
ENTRYPOINT := $(SRC)/__main__.py
DIST := dist
COMPILED := $(DIST)/$(NAME)
STATIC_COMPILED := $(COMPILED).static
.PHONY: deps
deps:
requires=$(shell mktemp)
python setup.py -q dependencies > \$requires
pip install -r \$requires
rm \$requires
.PHONY: dev-deps
dev-deps:
pip install -r requirements-dev.txt
.PHONY: lint
lint:
black .
flake8
.PHONY: lint-check
lint-check:
flake8
black --check --diff .
.PHONY: test
test:
python -m pytest
.PHONY: build
build:
python setup.py sdist bdist_wheel
.PHONY: pyinstaller
pyinstaller: deps
python setup.py pyinstaller
.PHONY: staticx_deps
staticx_deps:
command -v patchelf > /dev/null 2>&1 || (echo "patchelf is not available. install it in order to use staticx" && false)
.PHONY: pyinstaller_static
pyinstaller_static: staticx_deps pyinstaller
staticx $(COMPILED) $(STATIC_COMPILED)
.PHONY: install
install:
pip install .
.PHONY: uninstall
uninstall:
pip uninstall $(NAME)
.PHONY: publish
publish:
twine upload dist/*
.PHONY: clean
clean:
rm -rf build/ dist/ *.egg-info/ .eggs/ .pytest_cache/ .mypy_cache .coverage *.spec
find . -type d -name __pycache__ -exec rm -rf '{}' +