diff options
-rw-r--r-- | build_scripts/wheel_override.py | 13 | ||||
-rw-r--r-- | sources/shiboken2/data/shiboken_helpers.cmake | 2 |
2 files changed, 12 insertions, 3 deletions
diff --git a/build_scripts/wheel_override.py b/build_scripts/wheel_override.py index 62a6bbe86..03c9c92ab 100644 --- a/build_scripts/wheel_override.py +++ b/build_scripts/wheel_override.py @@ -160,8 +160,17 @@ class PysideBuildWheel(_bdist_wheel): else: abi_tag = str(get_abi_tag()).lower() tag = (impl, abi_tag, plat_name) - supported_tags = pep425tags.get_supported( - supplied_platform=plat_name if self.plat_name_supplied else None) + try: + supported_tags = pep425tags.get_supported( + supplied_platform=plat_name if self.plat_name_supplied else None) + except TypeError: + # This was breaking the CI, specifically the: + # OpenSUSE 15 x86_64 using ICC + # Some versions of Python 2.7 require an argument called + # 'archive_root' which doesn't exist on 3, so we set it to + # 'None' for those version (e.g.: Python 2.7.14) + supported_tags = pep425tags.get_supported(None, + supplied_platform=plat_name if self.plat_name_supplied else None) # XXX switch to this alternate implementation for non-pure: if (self.py_limited_api) or (plat_name in ('manylinux1_x86_64') and sys.version_info[0] == 2): return tag 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) |