Minimal Tensor Library for Python
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

44 lines
811 B

PWD := $(shell pwd)
POETRY := poetry
PYTHON := $(POETRY) run python
PYTEST := $(POETRY) run pytest
PYSEN := $(POETRY) run pysen
MODULE := xsor
.PHONY: all
all: format lint test
.PHONY: build
build:
$(POETRY) run maturin build --release
.PHONY: test
test:
PYTHONPATH=$(PWD) $(PYTEST)
.PHONY: lint
lint:
PYTHONPATH=$(PWD) $(PYSEN) run lint
.PHONY: format
format:
PYTHONPATH=$(PWD) $(PYSEN) run format
.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 build/
rm -rf dist/
rm -rf *.egg-info/
rm -rf pip-wheel-metadata/