aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io>2022-03-18 11:50:52 +0100
committerCristián Maureira-Fredes <cristian.maureira-fredes@qt.io>2022-07-05 09:23:03 +0200
commit750eb2a956c4e2dd44d7ac457c81883da674dbba (patch)
tree9326ad4e0e878163ad79ad943a1e48c78ff914b7
parent264d9a08003b5cc60e7eaa6fe0f182564ee20fa1 (diff)
build: update wheel names
- Removing extra cpX arguments from the wheel name - Use PEP600 to include the glibc version on the wheel name, instead of manylinux1. - Use 'abi3' on windows instead of 'none', because it's already supported on Windows Change-Id: I312586b72d38f2c5c4835ba5040d064e44c80e29 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit a72239ef610940910b6375f638c0708cd1da97ff) Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
-rw-r--r--build_scripts/utils.py6
-rw-r--r--build_scripts/wheel_override.py31
2 files changed, 21 insertions, 16 deletions
diff --git a/build_scripts/utils.py b/build_scripts/utils.py
index 49839e2de..dafd3f362 100644
--- a/build_scripts/utils.py
+++ b/build_scripts/utils.py
@@ -64,6 +64,10 @@ except NameError:
WindowsError = None
+def is_64bit():
+ return sys.maxsize > 2147483647
+
+
def filter_match(name, patterns):
for pattern in patterns:
if pattern is None:
@@ -1242,4 +1246,4 @@ def provisioning():
print("debug: Exception error: {}".format(e))
file = file.replace("s://download","://master")
print("New url: {}".format(file))
- download_and_extract_7z(file, target) \ No newline at end of file
+ download_and_extract_7z(file, target)
diff --git a/build_scripts/wheel_override.py b/build_scripts/wheel_override.py
index 3f3c12a2e..ba4f5b11e 100644
--- a/build_scripts/wheel_override.py
+++ b/build_scripts/wheel_override.py
@@ -38,14 +38,17 @@
#############################################################################
-wheel_module_exists = False
-
import os
import sys
+import platform
from .options import DistUtilsCommandMixin, OPTION
from distutils import log as logger
from email.generator import Generator
from .wheel_utils import get_package_version, get_qt_version, macos_plat_name
+from .utils import is_64bit
+
+wheel_module_exists = False
+
try:
@@ -86,11 +89,11 @@ class PysideBuildWheel(_bdist_wheel, DistUtilsCommandMixin):
self.plat_name = macos_plat_name()
# When limited API is requested, notify bdist_wheel to
- # create a properly named package.
- limited_api_enabled = (OPTION["LIMITED_API"] == 'yes'
- and sys.version_info[0] >= 3)
+ # create a properly named package, which will contain
+ # the initial cpython version we support.
+ limited_api_enabled = OPTION["LIMITED_API"] == 'yes'
if limited_api_enabled:
- self.py_limited_api = "cp35.cp36.cp37.cp38.cp39.cp310"
+ self.py_limited_api = "cp36"
self._package_version = get_package_version()
@@ -101,9 +104,9 @@ class PysideBuildWheel(_bdist_wheel, DistUtilsCommandMixin):
# Slightly modified version of wheel's wheel_dist_name
# method, to add the Qt version as well.
# Example:
- # PySide2-5.6-5.6.4-cp27-cp27m-macosx_10_10_intel.whl
- # The PySide2 version is "5.6".
- # The Qt version built against is "5.6.4".
+ # PySide6-6.3-6.3.2-cp36-abi3-macosx_10_10_intel.whl
+ # The PySide6 version is "6.3".
+ # The Qt version built against is "6.3.2".
wheel_version = "{}-{}".format(self._package_version, get_qt_version())
components = (_safer_name(self.distribution.get_name()), wheel_version)
if self.build_number:
@@ -113,9 +116,7 @@ class PysideBuildWheel(_bdist_wheel, DistUtilsCommandMixin):
# Copy of get_tag from bdist_wheel.py, to allow setting a
# multi-python impl tag, by removing an assert. Otherwise we
# would have to rename wheels manually for limited api
- # packages. Also we set "none" abi tag on Windows, because
- # pip does not yet support "abi3" tag, leading to
- # installation failure when tried.
+ # packages.
def get_tag(self):
# bdist sets self.plat_name if unset, we should only use it for purepy
# wheels if the user supplied it.
@@ -136,7 +137,7 @@ class PysideBuildWheel(_bdist_wheel, DistUtilsCommandMixin):
# modules, use the default platform name.
plat_name = get_platform(self.bdist_dir)
- if plat_name in ('linux-x86_64', 'linux_x86_64') and sys.maxsize == 2147483647:
+ if plat_name in ('linux-x86_64', 'linux_x86_64') and not is_64bit():
plat_name = 'linux_i686'
# To allow uploading to pypi, we need the wheel name
@@ -157,7 +158,7 @@ class PysideBuildWheel(_bdist_wheel, DistUtilsCommandMixin):
if self.root_is_pure:
if self.universal:
- impl = 'py2.py3'
+ impl = 'py3'
else:
impl = self.python_tag
tag = (impl, 'none', plat_name)
@@ -168,7 +169,7 @@ class PysideBuildWheel(_bdist_wheel, DistUtilsCommandMixin):
# We don't work on CPython 3.1, 3.0.
if self.py_limited_api and (impl_name + impl_ver).startswith('cp3'):
impl = self.py_limited_api
- abi_tag = "abi3" if sys.platform != "win32" else "none"
+ abi_tag = "abi3"
else:
abi_tag = str(get_abi_tag()).lower()
tag = (impl, abi_tag, plat_name)