Set the minimum python version required by anki on qt/setup.py
This commit is contained in:
parent
2f9979bd30
commit
274944e678
@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
import sys
|
||||
from distutils.version import LooseVersion
|
||||
|
||||
import setuptools
|
||||
@ -15,6 +16,7 @@ def package_files(directory):
|
||||
|
||||
# just the Python files for type hints?
|
||||
pyonly = os.getenv("PYFILESONLY")
|
||||
minimum_python_version = (3, 7)
|
||||
|
||||
if pyonly:
|
||||
extra_files = []
|
||||
@ -33,6 +35,11 @@ install_requires = [
|
||||
'darkdetect; sys.platform == "darwin"',
|
||||
]
|
||||
|
||||
if sys.version_info < minimum_python_version:
|
||||
raise RuntimeError(
|
||||
"The minimum Python interpreter version required for Anki is '%s' "
|
||||
"and version '%s' was found!" % (minimum_python_version, sys.version_info)
|
||||
)
|
||||
|
||||
try:
|
||||
import PyQt5 as IS_PYQT_INSTALLED
|
||||
|
Loading…
Reference in New Issue
Block a user