-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (35 loc) · 1.1 KB
/
Makefile
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
42
43
44
45
46
47
48
.PHONY: init install uninstall wheel release format test clear
NAME = BigKindsParser
SHELL := bash
python = python3
ifeq ($(OS),Windows_NT)
python := python
endif
ifndef production
install_extension = pip install $(pip_user_option) -e .
else
install_extension = $(python) setup.py bdist_wheel && \
pip install $(pip_user_option) --find-links "dist/" $(NAME)
endif
init:
$(python) -m pip install $(pip_user_option) --upgrade pip && \
$(python) -m pip install $(pip_user_option) --upgrade 'build>=0.7' 'setuptools>=61.0,<64.0' 'wheel>=0.37' && \
$(python) -m pip install $(pip_user_option) -r requirements.txt \
pre-commit install
install:
$(install_extension)
uninstall:
pip uninstall --yes $(NAME)
wheel:
$(python) setup.py bdist_wheel
lint:
$(python) -m isort --settings-file=setup.cfg pyBigKinds/ test/
format:
$(python) -m flake8 --config=setup.cfg pyBigKinds/ test/
$(python) -m pylint --rcfile=.pylintrc pyBigKinds/
test:
$(python) -W ignore::FutureWarning -m pytest -v -s
clear:
shopt -s globstar ; \
rm -fr pyBigKinds.egg-info/ build/ dist/ ;\
rm -fr **/__pycache__ **/.pytest_cache ;