diff options
| author | Cristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io> | 2022-10-11 18:01:26 +0200 |
|---|---|---|
| committer | Cristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io> | 2022-10-13 18:56:55 +0200 |
| commit | 19acc417df1a920a5ded49258cf4b88f837fbcdc (patch) | |
| tree | 81ff795124b5797faa937663c98a4f9ae2926fdb /build_scripts/wheel_utils.py | |
| parent | 90289a1be1735cde5fc2471bc599de30bcbefc89 (diff) | |
build: replace DistutilsSetupError by SetupError
Replacing the distutils errors by the setuptools one.
Task-number: PYSIDE-2079
Change-Id: I9968d9562f8dd40317344d3295943c194e3f2197
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'build_scripts/wheel_utils.py')
| -rw-r--r-- | build_scripts/wheel_utils.py | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/build_scripts/wheel_utils.py b/build_scripts/wheel_utils.py index d485aeb2f..31d8c7bd0 100644 --- a/build_scripts/wheel_utils.py +++ b/build_scripts/wheel_utils.py @@ -6,7 +6,7 @@ import time from sysconfig import get_config_var, get_platform from packaging.version import parse as parse_version -from setuptools._distutils.errors import DistutilsSetupError +from setuptools.errors import SetupError from .options import OPTION from .qtinfo import QtInfo @@ -28,12 +28,11 @@ def get_qt_version(): qt_version = qtinfo.version if not qt_version: - raise DistutilsSetupError("Failed to query the Qt version with " - f"qmake {qtinfo.qmake_command}") + raise SetupError("Failed to query the Qt version with qmake {qtinfo.qmake_command}") if parse_version(qtinfo.version) < parse_version("5.7"): - raise DistutilsSetupError(f"Incompatible Qt version detected: {qt_version}. " - "A Qt version >= 5.7 is required.") + raise SetupError(f"Incompatible Qt version detected: {qt_version}. " + "A Qt version >= 5.7 is required.") return qt_version @@ -69,7 +68,7 @@ def macos_qt_min_deployment_target(): target = QtInfo().macos_min_deployment_target if not target: - raise DistutilsSetupError("Failed to query for Qt's QMAKE_MACOSX_DEPLOYMENT_TARGET.") + raise SetupError("Failed to query for Qt's QMAKE_MACOSX_DEPLOYMENT_TARGET.") return target @@ -102,11 +101,9 @@ def macos_pyside_min_deployment_target(): # precedence. if setup_target: if python_target and setup_target_split < python_target_split: - raise DistutilsSetupError(message.format(setup_target, "Python", - python_target)) + raise SetupError(message.format(setup_target, "Python", python_target)) if setup_target_split < qt_target_split: - raise DistutilsSetupError(message.format(setup_target, "Qt", - qt_target)) + raise SetupError(message.format(setup_target, "Qt", qt_target)) # All checks clear, use setup.py provided value. return setup_target |
