From 4cf64519fb72a35b33b7241341d43c95131b2ad9 Mon Sep 17 00:00:00 2001 From: evandrocoan Date: Sat, 9 May 2020 00:00:16 -0300 Subject: [PATCH] Automatically install pyaudio when running make check --- .github/workflows/checks.yml | 6 ------ Makefile | 3 +-- qt/Makefile | 6 +++++- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 548ed954e..87816e4e0 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -123,9 +123,6 @@ jobs: echo "::set-env name=RSPY_TARGET_DIR::${GITHUB_WORKSPACE}/target" echo "::set-env name=CARGO_TARGET_DIR::${GITHUB_WORKSPACE}/target" - # https://anki.tenderapp.com/discussions/add-ons/44009-problems-with-code-completion - echo "::set-env name=ANKI_EXTRA_PIP::python -m pip install pyaudio" - - name: Configure Mac OS environment variables if: matrix.os == 'macos-latest' run: | @@ -144,9 +141,6 @@ jobs: # https://stackoverflow.com/questions/59644349/msgmerge-on-macos-catalina echo "::set-env name=PATH::/usr/local/opt/gettext/bin:$PATH" - # https://anki.tenderapp.com/discussions/add-ons/44009-problems-with-code-completion - echo "::set-env name=ANKI_EXTRA_PIP::python -m pip install pyaudio" - - name: Configure Windows environment variables if: matrix.os == 'windows-latest' run: | diff --git a/Makefile b/Makefile index d47c720e4..8a93c5dd5 100644 --- a/Makefile +++ b/Makefile @@ -61,8 +61,7 @@ all: run # - modern pip required for wheel # - add qt if missing pyenv: -# https://github.com/PyO3/maturin/issues/283 -# Expected `python` to be a python interpreter inside a virtualenv +# https://github.com/PyO3/maturin/issues/283 - Expected `python` to be a python interpreter inside a virtualenv set -eu -o pipefail ${SHELLFLAGS}; \ "${PYTHON_BIN}" -m pip install virtualenv; \ "${PYTHON_BIN}" -m venv pyenv; \ diff --git a/qt/Makefile b/qt/Makefile index e11da7c3d..879acf434 100644 --- a/qt/Makefile +++ b/qt/Makefile @@ -70,7 +70,11 @@ BUILD_STEPS := .build/vernum .build/run-deps .build/dev-deps .build/js .build/ui ###################### .PHONY: check -check: $(BUILD_STEPS) .build/mypy .build/test .build/fmt .build/imports .build/lint .build/ts-fmt +check: pyaudio $(BUILD_STEPS) .build/mypy .build/test .build/fmt .build/imports .build/lint .build/ts-fmt + +# https://github.com/ankitects/anki/pull/611 - Automatically install pyaudio when running make check +pyaudio: + python -m pip install pyaudio .PHONY: fix fix: $(BUILD_STEPS)