From 07a24c0d42a773cb62b8e5a10a70d1ec3d1e96ed Mon Sep 17 00:00:00 2001 From: evandrocoan Date: Mon, 16 Mar 2020 15:53:10 -0300 Subject: [PATCH] Fixed make check for pylint not working on Windows due F:\Python\python.exe: can't open file '/cygdrive/f/anki/pyenv/Scripts/pylint': [Errno 2] No such file or directory --- pylib/Makefile | 10 +++++----- qt/Makefile | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pylib/Makefile b/pylib/Makefile index c78af5bf4..96ed9cfd0 100644 --- a/pylib/Makefile +++ b/pylib/Makefile @@ -33,7 +33,7 @@ PROTODEPS := $(wildcard ../proto/*.proto) .build/hooks: tools/genhooks.py tools/hookslib.py python tools/genhooks.py - black anki/hooks.py + python -m black anki/hooks.py @touch $@ BUILD_STEPS := .build/run-deps .build/dev-deps .build/py-proto anki/buildinfo.py .build/hooks @@ -47,7 +47,7 @@ check: $(BUILD_STEPS) .build/mypy .build/test .build/fmt .build/imports .build/l .PHONY: fix fix: $(BUILD_STEPS) isort $(ISORTARGS) - black $(BLACKARGS) + python -m black $(BLACKARGS) .PHONY: clean clean: @@ -59,7 +59,7 @@ clean: CHECKDEPS := $(shell ${FIND} anki tests -name '*.py' | grep -v buildinfo.py) .build/mypy: $(CHECKDEPS) - mypy anki + python -m mypy anki @touch $@ .build/test: $(CHECKDEPS) @@ -67,7 +67,7 @@ CHECKDEPS := $(shell ${FIND} anki tests -name '*.py' | grep -v buildinfo.py) @touch $@ .build/lint: $(CHECKDEPS) - pylint -j 0 --rcfile=.pylintrc -f colorized --extension-pkg-whitelist=ankirspy anki tests setup.py + python -m pylint -j 0 --rcfile=.pylintrc -f colorized --extension-pkg-whitelist=ankirspy anki tests setup.py @touch $@ .build/imports: $(CHECKDEPS) @@ -75,7 +75,7 @@ CHECKDEPS := $(shell ${FIND} anki tests -name '*.py' | grep -v buildinfo.py) @touch $@ .build/fmt: $(CHECKDEPS) - black --check $(BLACKARGS) + python -m black --check $(BLACKARGS) @touch $@ # Building diff --git a/qt/Makefile b/qt/Makefile index 82cd91292..e6aa5e899 100644 --- a/qt/Makefile +++ b/qt/Makefile @@ -42,7 +42,7 @@ TSDEPS := $(wildcard ts/src/*.ts) $(wildcard ts/scss/*.scss) .build/hooks: tools/genhooks_gui.py ../pylib/tools/hookslib.py python tools/genhooks_gui.py - black aqt/gui_hooks.py + python -m black aqt/gui_hooks.py @touch $@ BUILD_STEPS := .build/run-deps .build/dev-deps .build/js .build/ui aqt/buildinfo.py .build/hooks .build/i18n @@ -56,7 +56,7 @@ check: $(BUILD_STEPS) .build/mypy .build/test .build/fmt .build/imports .build/l .PHONY: fix fix: $(BUILD_STEPS) isort $(ISORTARGS) - black $(BLACKARGS) + python -m black $(BLACKARGS) (cd ts && npm run pretty) .PHONY: clean @@ -80,7 +80,7 @@ PYLIB := ../pylib CHECKDEPS := $(shell ${FIND} aqt tests -name '*.py' | grep -v buildinfo.py) .build/mypy: $(CHECKDEPS) .build/qt-stubs - mypy aqt + python -m mypy aqt @touch $@ .build/test: $(CHECKDEPS) @@ -88,7 +88,7 @@ CHECKDEPS := $(shell ${FIND} aqt tests -name '*.py' | grep -v buildinfo.py) @touch $@ .build/lint: $(CHECKDEPS) - pylint -j 0 --rcfile=.pylintrc -f colorized --extension-pkg-whitelist=PyQt5,ankirspy aqt tests setup.py + python -m pylint -j 0 --rcfile=.pylintrc -f colorized --extension-pkg-whitelist=PyQt5,ankirspy aqt tests setup.py @touch $@ .build/imports: $(CHECKDEPS) @@ -96,7 +96,7 @@ CHECKDEPS := $(shell ${FIND} aqt tests -name '*.py' | grep -v buildinfo.py) @touch $@ .build/fmt: $(CHECKDEPS) - black --check $(BLACKARGS) + python -m black --check $(BLACKARGS) @touch $@ .build/qt-stubs: