29 lines
657 B
Makefile
29 lines
657 B
Makefile
PYTHON ?= python3
|
|
|
|
.PHONY: help test build install uninstall clean
|
|
|
|
help:
|
|
@echo "Targets:"
|
|
@echo " test Run tests"
|
|
@echo " build Build source/wheel package"
|
|
@echo " install Install package with pip"
|
|
@echo " uninstall Remove package"
|
|
@echo " clean Remove build artifacts"
|
|
|
|
test:
|
|
PYTHONPATH=src $(PYTHON) -m unittest discover -s tests
|
|
|
|
build:
|
|
$(PYTHON) -m pip install --upgrade build
|
|
$(PYTHON) -m build
|
|
|
|
install:
|
|
$(PYTHON) -m pip install .
|
|
|
|
uninstall:
|
|
$(PYTHON) -m pip uninstall -y rspamd-mail-trainer
|
|
|
|
clean:
|
|
rm -rf build dist *.egg-info src/*.egg-info .pytest_cache
|
|
find . -type d -name __pycache__ -prune -exec rm -rf {} +
|