diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 3405b57df..7c6f02e68 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -270,7 +270,7 @@ jobs: cd dist setlocal EnableDelayedExpansion cmd /C set "wheels=" && for /f "delims=" %%i in ('dir /b *.*') DO set "wheels="%%i" !wheels!" - python -m pip install %wheels% + python -m pip install pyqtwebengine %wheels% python -c "import aqt; # aqt.run()" - name: Check Linux/Mac OS wheels @@ -278,7 +278,7 @@ jobs: run: | set -x cd dist - python -m pip install *.* + python -m pip install pyqtwebengine *.* python -c "import aqt; # aqt.run()" - run: make check diff --git a/qt/Makefile b/qt/Makefile index c27741da0..6c1de33df 100644 --- a/qt/Makefile +++ b/qt/Makefile @@ -129,8 +129,8 @@ CHECKDEPS := $(shell ${FIND} aqt tests -name '*.py' | grep -v buildinfo.py) .PHONY: build build: $(BUILD_STEPS) rm -rf dist build - python setup.py -q sdist - rsync -a dist/*.tar.gz ../dist/ + python setup.py -q bdist_wheel + rsync -a dist/*.whl ../dist/ .PHONY: develop develop: $(BUILD_STEPS) diff --git a/qt/setup.py b/qt/setup.py index f77b796f8..2c7217e43 100644 --- a/qt/setup.py +++ b/qt/setup.py @@ -2,7 +2,6 @@ # -*- coding: utf-8 -*- import os import sys -from distutils.version import LooseVersion import setuptools @@ -30,6 +29,7 @@ install_requires = [ "pyaudio", "markdown", "jsonschema", + "pyqt5>=5.9", 'psutil; sys.platform == "win32"', 'pywin32; sys.platform == "win32"', 'darkdetect; sys.platform == "darwin"', @@ -41,25 +41,6 @@ if sys.version_info < minimum_python_version: "and version '%s' was found!" % (minimum_python_version, sys.version_info) ) -try: - import PyQt5 as IS_PYQT_INSTALLED - -except (ImportError, ValueError): - IS_PYQT_INSTALLED = None - -try: - from PyQt5.Qt import PYQT_VERSION_STR - -except (ImportError, ValueError): - PYQT_VERSION_STR = None - -# https://github.com/ankitects/anki/pull/530 -if not IS_PYQT_INSTALLED or ( - PYQT_VERSION_STR and LooseVersion(PYQT_VERSION_STR) >= LooseVersion("5.12") -): - install_requires.append("pyqt5") - install_requires.append("pyqtwebengine") - setuptools.setup( name="aqt",