PWD := $(shell pwd) MODULE := monotone CARGO := cargo POETRY := poetry PYTHON := $(POETRY) run python PYTEST := $(POETRY) run pytest PYTHONPATH := $(PWD) .PHONY: build build: $(POETRY) run maturin build .PHONY: install install: $(POETRY) run maturin develop .PHONY: test test: cargo-test install pytest .PHONY: cargo-test cargo-test: $(CARGO) test .PHONY: pytest pytest: PYTHONPATH=$(PYTHONPATH) $(PYTEST) .PHONY: clean clean: clean-pyc clean-build .PHONY: clean-pyc clean-pyc: rm -rf .pytest_cache rm -rf .mypy_cache find . -name '*.pyc' -exec rm -f {} + find . -name '*.pyo' -exec rm -f {} + find . -name '*~' -exec rm -f {} + find . -name '__pycache__' -exec rm -fr {} + .PHONY: clean-build clean-build: rm -rf target rm -rf build/ rm -rf dist/ rm -rf $(MODULE).egg-info/ rm -rf pip-wheel-metadata/ find $(MODULE) -name "*.so" -exec rm -f {} +