.PHONY: develop test rust-test py-test fmt-check release-check

PYTHON ?= python3

develop:
	$(PYTHON) -m pip install -U pip maturin pytest
	maturin develop --features python

test: rust-test py-test

rust-test:
	cargo test --lib --features python

py-test:
	$(PYTHON) -m pytest -q

fmt-check:
	cargo fmt --check

release-check:
	rm -rf dist
	$(PYTHON) -m pip install -U maturin twine
	maturin sdist
	maturin build --release --features python
	twine check dist/*
