mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
Deprecated sdist wheels and pyqtwebengine as dependency
This commit is contained in:
parent
274944e678
commit
efe319ec95
3 changed files with 5 additions and 24 deletions
4
.github/workflows/checks.yml
vendored
4
.github/workflows/checks.yml
vendored
|
@ -270,7 +270,7 @@ jobs:
|
||||||
cd dist
|
cd dist
|
||||||
setlocal EnableDelayedExpansion
|
setlocal EnableDelayedExpansion
|
||||||
cmd /C set "wheels=" && for /f "delims=" %%i in ('dir /b *.*') DO set "wheels="%%i" !wheels!"
|
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()"
|
python -c "import aqt; # aqt.run()"
|
||||||
|
|
||||||
- name: Check Linux/Mac OS wheels
|
- name: Check Linux/Mac OS wheels
|
||||||
|
@ -278,7 +278,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
set -x
|
set -x
|
||||||
cd dist
|
cd dist
|
||||||
python -m pip install *.*
|
python -m pip install pyqtwebengine *.*
|
||||||
python -c "import aqt; # aqt.run()"
|
python -c "import aqt; # aqt.run()"
|
||||||
|
|
||||||
- run: make check
|
- run: make check
|
||||||
|
|
|
@ -129,8 +129,8 @@ CHECKDEPS := $(shell ${FIND} aqt tests -name '*.py' | grep -v buildinfo.py)
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build: $(BUILD_STEPS)
|
build: $(BUILD_STEPS)
|
||||||
rm -rf dist build
|
rm -rf dist build
|
||||||
python setup.py -q sdist
|
python setup.py -q bdist_wheel
|
||||||
rsync -a dist/*.tar.gz ../dist/
|
rsync -a dist/*.whl ../dist/
|
||||||
|
|
||||||
.PHONY: develop
|
.PHONY: develop
|
||||||
develop: $(BUILD_STEPS)
|
develop: $(BUILD_STEPS)
|
||||||
|
|
21
qt/setup.py
21
qt/setup.py
|
@ -2,7 +2,6 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from distutils.version import LooseVersion
|
|
||||||
|
|
||||||
import setuptools
|
import setuptools
|
||||||
|
|
||||||
|
@ -30,6 +29,7 @@ install_requires = [
|
||||||
"pyaudio",
|
"pyaudio",
|
||||||
"markdown",
|
"markdown",
|
||||||
"jsonschema",
|
"jsonschema",
|
||||||
|
"pyqt5>=5.9",
|
||||||
'psutil; sys.platform == "win32"',
|
'psutil; sys.platform == "win32"',
|
||||||
'pywin32; sys.platform == "win32"',
|
'pywin32; sys.platform == "win32"',
|
||||||
'darkdetect; sys.platform == "darwin"',
|
'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)
|
"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(
|
setuptools.setup(
|
||||||
name="aqt",
|
name="aqt",
|
||||||
|
|
Loading…
Reference in a new issue