-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (26 loc) · 871 Bytes
/
Makefile
File metadata and controls
32 lines (26 loc) · 871 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
.PHONY: clean-build clean-pycache quality style clean build
# clean the build
clean-build:
rm -rf build
rm -rf dist
find . -name *.egg-info | xargs rm -rf
@echo "\e[32mAll the build, dist and egg-info cleaned\e[0m"
# clean the cache
clean-pycache:
find . -name __pycache__ | xargs rm -rf
find . -name *.pyc | xargs rm -rf
find . -name *.pyo | xargs rm -rf
@echo "\e[32mAll python cache is cleaned.\e[0m"
# check code quality
quality:
black --check --line-length 120 --target-version py36 src | cat
isort --check-only --recursive -tc -up --line-width=120 src | cat
flake8 --exclude=.git,__pycache__,docs/source/conf.py,old,build,dist --statistics src | cat
#Format source code
style:
black --line-length 120 --target-version py36 src
isort -rc -tc -up --line-width=120 src
# clean
clean: clean-build clean-pycache quality
build:
python setup.py sdist