-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakeFile
More file actions
92 lines (73 loc) · 2.28 KB
/
MakeFile
File metadata and controls
92 lines (73 loc) · 2.28 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
.PHONY: all install dev-install test lint type-check security-check clean distclean deb build help
# Variables
PYTHON := python3
PIP := pip3
PROJECT := liveexploit
VERSION := $(shell python -c "from $(PROJECT) import __version__; print(__version__)")
# Default target
all: help
# Installation
install:
$(PIP) install -e .
dev-install:
$(PIP) install -e ".[dev]"
# Testing
test:
pytest tests/unit/ -v --cov=$(PROJECT) --cov-report=html --cov-report=term-missing
test-integration:
pytest tests/integration/ -v -m integration
test-all: test test-integration
# Code quality
lint:
flake8 $(PROJECT) tests
bandit -r $(PROJECT) -f html -o bandit_report.html
type-check:
mypy $(PROJECT)
security-check:
safety check --json --output safety_report.json
check: lint type-check security-check
# Build and distribution
build:
$(PYTHON) -m build
deb: clean
dpkg-buildpackage -us -uc
distclean: clean
rm -rf dist/ build/ *.egg-info/ .mypy_cache/ .pytest_cache/ .coverage htmlcov/ bandit_report.html safety_report.json
clean:
find . -type f -name "*.pyc" -delete
find . -type d -name "__pycache__" -delete
rm -rf *.log .cache
# Development
format:
black $(PROJECT) tests
isort $(PROJECT) tests
coverage:
pytest --cov=$(PROJECT) --cov-report=html
# Documentation
docs:
cd docs && make html
# Help
help:
@echo "LiveExploit Development Targets:"
@echo ""
@echo " install - Install package in development mode"
@echo " dev-install - Install with development dependencies"
@echo " test - Run unit tests with coverage"
@echo " test-integration - Run integration tests"
@echo " test-all - Run all tests"
@echo ""
@echo " lint - Run flake8 and bandit checks"
@echo " type-check - Run mypy type checking"
@echo " security-check - Run safety vulnerability check"
@echo " check - Run all code quality checks"
@echo ""
@echo " build - Build source and wheel distributions"
@echo " deb - Build Debian package"
@echo " clean - Clean Python cache files"
@echo " distclean - Clean all generated files"
@echo ""
@echo " format - Format code with black and isort"
@echo " coverage - Generate HTML coverage report"
@echo " docs - Build documentation"
@echo ""
@echo "Current version: $(VERSION)"