aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorCristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io>2022-03-02 02:22:00 +0100
committerCristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io>2022-03-29 13:51:35 +0200
commitc565eada8ff164cff07566e1499992327c2536ba (patch)
treed4ea7d7728a8ff9f54459446c59194e39394b83e /testing
parent72309bc9901c4e37ed7e0153668b8df3c52e458f (diff)
build: script to create wheels
This approach intends to avoid modifying the current structure we have in build_scripts, and can replace the call: python setup.py bdist_wheel mainly encouraged by PEP517, and the need of having incremental wheels, to replace the current single PySide6 one. The current configuration allows to create two new wheels: PySide6_Essentials, and PySide6_Addons that contain all the essential and addons Qt modules defined by the Qt Installer tool, with some modifications due to the dependencies of certain tools. Check the README files for more info. The known PySide6 wheel is also generated, but it's empty in favor of using the previous two wheels as requirements, installing them automatically, to avoid modifying the usage of 'pip install pyside6' The strategy is based on the current logic behing 'prepare_packages' that we have been using. Once the modules are built, instead of removing those directories currently in 'build/your_env/package', we rename them. Inside this new directory, one can have the 'shiboken6', 'shiboken6_generator', and 'PySide6' directories, with eveything already packed with the required wheel structure. The main difference is that instead of using the content of PySide6 to build one build, we select some files with the MANIFEST.in to create another wheel. The wheel tag drops the old assumption of needing: cp36.cp37.cp38.cp39.cp310-abi3 and only uses: cp36-abi3 Additionally, for Linux, we follow PEP600 to use the GLIBC version in the wheel name instead of manylinux1, manylinux2010, etc... For the current CI configuration, we know we are using 2.28, which is the minimum supported version for Qt6, so the wheel will look like: PySide6-6.3.0-cp36-abi3-manylinux_2_28_x86_64.whl The coin scripts were configured as well, to add the call of the new create_wheels.py script, and test them via wheel_tester.py Note: This script is not intended to be used as a general purpose wheel creation tool, and it's purely focused on the current Qt CI. There are many ad-hoc configurations used in different functions, like the structure of a Qt installation, the usage of 'a' on the environment for limited-api, etc. Task-number: PYSIDE-1115 Fixes: PYSIDE-692 Change-Id: Ic12e428b8b9b64bbe2facb1c520595ccd2384497 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'testing')
-rw-r--r--testing/wheel_tester.py19
1 files changed, 13 insertions, 6 deletions
diff --git a/testing/wheel_tester.py b/testing/wheel_tester.py
index db36aa45e..c97647861 100644
--- a/testing/wheel_tester.py
+++ b/testing/wheel_tester.py
@@ -76,6 +76,7 @@ import platform
log.set_verbosity(1)
+NEW_WHEELS = False
def find_executable(executable, command_line_value):
value = command_line_value
@@ -104,8 +105,8 @@ QMAKE_PATH = None
CMAKE_PATH = None
-def get_wheels_dir():
- return os.path.join(setup_script_dir, "dist")
+def get_wheels_dir(dir_name):
+ return os.path.join(setup_script_dir, dir_name)
def get_examples_dir():
@@ -115,7 +116,10 @@ def get_examples_dir():
def package_prefix_names():
# Note: shiboken6_generator is not needed for compile_using_nuitka,
# but building modules with cmake needs it.
- return ["shiboken6", "shiboken6_generator", "PySide6"]
+ if NEW_WHEELS:
+ return ["shiboken6", "shiboken6_generator", "PySide6_Essentials", "PySide6_Addons", "PySide6"]
+ else:
+ return ["shiboken6", "shiboken6_generator", "PySide6"]
def clean_egg_info():
@@ -334,8 +338,8 @@ def try_build_examples():
execute_script(src_path / f"{modname}.pyi")
-def run_wheel_tests(install_wheels):
- wheels_dir = get_wheels_dir()
+def run_wheel_tests(install_wheels, wheels_dir_name):
+ wheels_dir = get_wheels_dir(wheels_dir_name)
py_version = f"{sys.version_info.major}.{sys.version_info.minor}"
if install_wheels:
@@ -358,8 +362,11 @@ if __name__ == "__main__":
)
parser.add_argument("--qmake", type=str, help="Path to qmake")
parser.add_argument("--cmake", type=str, help="Path to cmake")
+ parser.add_argument("--wheels-dir", type=str, help="Path to where the wheels are", default="dist")
+ parser.add_argument("--new", action="store_true", help="Option to test new wheels")
options = parser.parse_args()
QMAKE_PATH = find_executable("qmake", options.qmake)
CMAKE_PATH = find_executable("cmake", options.cmake)
+ NEW_WHEELS = options.new
- run_wheel_tests(not options.no_install_wheels)
+ run_wheel_tests(not options.no_install_wheels, options.wheels_dir)