aboutsummaryrefslogtreecommitdiffstats
path: root/sources
diff options
context:
space:
mode:
authorCristián Maureira-Fredes <cristian.maureira-fredes@qt.io>2020-01-27 13:08:18 +0100
committerCristián Maureira-Fredes <cristian.maureira-fredes@qt.io>2020-01-27 15:13:20 +0100
commitbc77dd5e92b8c0f21aad3b95ac1dafd51cd27c01 (patch)
treea05948b528416657732d8040b21d64cf811ff8b7 /sources
parentca5496ab7360a257e81dbc9d8bac653154af7dd3 (diff)
Fix machinery and pep425tags CI error
Currently the Shiboken macro only handles AttributeError but when 'machinery' is not found inside 'importlib' that case also needs to be handle by the except clause. Adding ImportError will allow us to get access to the Python suffixes that we need to build. Additionally, some old versions of Python (2.7.14) require an "archive_root" parameter on the 'wheel.pep425tags.get_supported' function, which is not required in new versions (2.7.16, and 3+). Change-Id: Icc6e7d1e9384ea01eec9281586f7ca988e3eb649 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources')
-rw-r--r--sources/shiboken2/data/shiboken_helpers.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/sources/shiboken2/data/shiboken_helpers.cmake b/sources/shiboken2/data/shiboken_helpers.cmake
index 5d7ff56bb..9772ee597 100644
--- a/sources/shiboken2/data/shiboken_helpers.cmake
+++ b/sources/shiboken2/data/shiboken_helpers.cmake
@@ -232,7 +232,7 @@ macro(get_python_extension_suffix)
try:
from importlib import machinery
first_suffix = machinery.EXTENSION_SUFFIXES[0]
- except AttributeError:
+ except (AttributeError, ImportError):
import imp
first_suffix = imp.get_suffixes()[0][0]
res = re.search(r'^(.+)\\.', first_suffix)