forked from arrayfire/arrayfire-py
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·41 lines (32 loc) · 825 Bytes
/
Makefile
File metadata and controls
executable file
·41 lines (32 loc) · 825 Bytes
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
SRC = arrayfire
ifeq ($(shell uname),Darwin)
ifeq ($(shell which gsed),)
$(error Please install GNU sed with 'brew install gnu-sed')
else
SED = gsed
endif
else
SED = sed
endif
.PHONY : version
version :
@python -c 'from arrayfire.version import VERSION; print(f"ArrayFire Python v{VERSION}")'
.PHONY : build
build :
@python -m build
# Dev
.PHONY : pre-commit
pre-commit :
black --check . && isort --check . && flake8 . && mypy . --cache-dir=/dev/null
# Testing
.PHONY : tests
tests :
pytest --color=yes -v -rf --durations=40 --cov-config=.coveragerc --cov=$(SRC) --cov-report=xml
# Cleaning
.PHONY : clean
clean :
rm -rf .pytest_cache/
rm -rf arrayfire.egg-info/
rm -rf dist/
rm -rf build/
find . | grep -E '(\.mypy_cache|__pycache__|\.pyc|\.pyo$$)' | xargs rm -rf