chore: enhance python.mk (#1474)
* chore: run pylint with multiple cpu * chore: use .venv as dev venv dir
This commit is contained in:
parent
4a7f2290f1
commit
5b1e61a13e
|
@ -17,13 +17,13 @@ SHARED_DEV_REQUIREMENTS = \
|
|||
pytest-cov \
|
||||
pytest-xdist
|
||||
|
||||
VENV = venv
|
||||
VENV = .venv
|
||||
$(VENV):
|
||||
python3 -m venv $(VENV)
|
||||
source $(VENV)/bin/activate
|
||||
$(MAKE) install
|
||||
|
||||
install: venv
|
||||
install: $(VENV)
|
||||
source $(VENV)/bin/activate
|
||||
pip install --upgrade pip setuptools wheel
|
||||
pip install $(SHARED_DEV_REQUIREMENTS) $(PIP_INSTALL)
|
||||
|
@ -43,7 +43,7 @@ install: venv
|
|||
.PHONY: .pylint
|
||||
.pylint: $(VENV)
|
||||
source $(VENV)/bin/activate
|
||||
pylint --output-format=colorized $(PYLINT_ARG) || true
|
||||
pylint --jobs=$(CPU_CORES) --output-format=colorized $(PYLINT_ARG) || true
|
||||
|
||||
.PHONY: .mypy
|
||||
.mypy: $(VENV)
|
||||
|
@ -52,7 +52,7 @@ install: venv
|
|||
|
||||
.PHONY: .pytest
|
||||
.pytest: $(VENV)
|
||||
source venv/bin/activate
|
||||
source $(VENV)/bin/activate
|
||||
pytest -n $(CPU_CORES) --color=yes -v $(PYTEST_ARG)
|
||||
|
||||
.PHONY: .clean
|
||||
|
|
Loading…
Reference in New Issue