chore: enhance python.mk (#1474)

* chore: run pylint with multiple cpu

* chore: use .venv as dev venv dir
This commit is contained in:
Jonas L 2022-01-04 12:09:19 +01:00 committed by GitHub
parent 4a7f2290f1
commit 5b1e61a13e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -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