From 1e4748d45e1cb1b2a792ae860597f477fd1d3c3f Mon Sep 17 00:00:00 2001 From: evandrocoan Date: Sun, 3 May 2020 22:00:58 -0300 Subject: [PATCH] Remove pyaudio as mandatory dependency Pyaudio on Windows is difficult to install and complicates things when someone is using the wheels just for autocomletion on IDEs as PyCharm: https://anki.tenderapp.com/discussions/add-ons/44009-problems-with-code-completion --- .github/workflows/checks.yml | 8 +++++++- qt/setup.py | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index bcdf28d20..548ed954e 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -123,6 +123,9 @@ 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: | @@ -141,6 +144,9 @@ 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: | @@ -342,7 +348,7 @@ jobs: run: | set -x cd dist - python -m pip install pyqtwebengine *.* + python -m pip install pyqtwebengine pyaudio *.* python -c "import aqt; # aqt.run()" - run: make check diff --git a/qt/setup.py b/qt/setup.py index ca8b57830..9e0e503d2 100644 --- a/qt/setup.py +++ b/qt/setup.py @@ -24,9 +24,10 @@ install_requires = [ "beautifulsoup4", "requests", "send2trash", - "pyaudio", "markdown", "jsonschema", + # "pyaudio", # https://anki.tenderapp.com/discussions/add-ons/44009-problems-with-code-completion + # "pyqtwebengine", # https://github.com/ankitects/anki/pull/530 - Set to checks.yml install and import anki wheels "pyqt5>=5.9", 'psutil; sys.platform == "win32"', 'pywin32; sys.platform == "win32"',