aboutsummaryrefslogtreecommitdiffstats
path: root/build_scripts/wheel_override.py
Commit message (Collapse)AuthorAgeFilesLines
* build_scripts: use f-strings instead of format()Cristian Maureira-Fredes2021-01-041-2/+2
| | | | | | | | Change-Id: I165e9a39f968f67f9eae3a632739908d5f8fda59 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 6cc55fefc8ddf12ecc9dcce33e367148e6216b1f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* build_scripts: replace print by distutils.logCristian Maureira-Fredes2021-01-041-3/+3
| | | | | | | Change-Id: I1106598719b48650847b08637e0caf6677cb26a0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit a35afc89a911612b4de3c71a8717f1fb74a39455) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* build_scripts: remove unused importsCristian Maureira-Fredes2021-01-041-1/+0
| | | | | | | Change-Id: I8a62512707b576ea79fff56779322c7e38bbb21b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit a99e441a2c6e58833c577eeb901f483234a3b816) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Rename PySide2 to PySide6Friedemann Kleint2020-11-021-2/+2
| | | | | | | | Adapt CMake files, build scripts, tests and examples. Task-number: PYSIDE-904 Change-Id: I845f7b006e9ad274fed5444ec4c1f9dbe176ff88 Reviewed-by: Christian Tismer <tismer@stackless.com>
* build_scripts: remove references to python 2Cristian Maureira-Fredes2020-10-271-6/+5
| | | | | | | | | * Removing all the special cases for Python 2.7 * Removing Python >=3 conditions * Keeping Python 3.6+ as the allowed Python Change-Id: Ie48cafe952ae7a11bea997da2a35e7df5fea9a44 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Remove wheel.pep425tags importsCristian Maureira-Fredes2020-10-261-18/+19
| | | | | | | | | | | The import was removed starting from v0.35 in favor of the packaging module and other functions that are not placed in 'bdist_wheel'. Pick-to: 5.15 Fixes: PYSIDE-1385 Change-Id: I97f5dbf9867f779a897d9041489831255ea54b67 Reviewed-by: Simo Fält <simo.falt@qt.io>
* Fix wheel_override error when wheel not availableCristian Maureira-Fredes2020-10-141-8/+9
| | | | | | | | | | | | | Since the try failed, there was no option to import DistUtilsCommandMixin and then a: NameError: name 'DistUtilsCommandMixin' is not defined and AttributeError: type object 'type' has no attribute 'user_options' was raised. Task-number: PYSIDE-807 Change-Id: If5aa37ce9928a5c029b21decc24bd2bccf9b4dc4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* setup.py: Show options in command helpFriedemann Kleint2020-10-141-2/+7
| | | | | | | | | | | | Move some options to a command mixin. This cannot be done for all options since some determine the package name and need to be known at before instantiating the commands. Print an additional help text listing them. Fixes: PYSIDE-807 Change-Id: I43adb09db16f74af037bfb754cad2c0f5cfe43be Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* setup.py: Remove constructor parameters depending on options from ↵Friedemann Kleint2020-10-061-14/+8
| | | | | | | | | | | | | PysideBuildWheel Constructor parameters depending on option values create a problem for introducing per-command option parsing. To fix this, split utility functions used by the commands in main.py and PysideBuildWheel into a separate wheel_utils.py Task-number: PYSIDE-807 Change-Id: Idabd3ba03726d2284e80234fc8485b70e6eb20ca Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* setup.py: Fix check for limited APIFriedemann Kleint2020-10-061-1/+2
| | | | | | | | Check for "yes"/"no", consistently. Task-number: PYSIDE-807 Change-Id: Id9f2ba125acb9ea8e811fd6cb5994bbb070605de Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* support Python 3.9Christian Tismer2020-08-191-1/+1
| | | | | | | | | | | This was merged with "WIP: Enable support for Python 3.9". There were minor problems, only. Thanks Cristian for adding cosmetic changes which should already have been applied in Python 3.8 or earlier. Change-Id: Id5e8696d9cfb7192243ad44c93e9f2cf347d6a7c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix machinery and pep425tags CI errorCristián Maureira-Fredes2020-01-271-2/+11
| | | | | | | | | | | | | | | 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>
* Replace OPTION_* by a dictionaryCristián Maureira-Fredes2019-12-031-3/+3
| | | | | | | | | | | | Currently we are importing * from the options.py file, which is a problem for the linters to discover if we are properly using the options of the file. Having a dictionary provides also a better way of access these options, and it is more clean than having one variable per each option. Change-Id: Ie70bd88665357b85e2842c5df269857504ecccdf Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Improve code style with flake8Cristián Maureira-Fredes2019-11-251-8/+9
| | | | | | | | | | | | | | | | | - We agreed on 100 columns time ago, so I move around a few things, - Removing unused modules, - Fix white-spaces tabs without being multiple of 4, - Encourage the use of os.path.join when joining paths, - Using .format() for string formatting, - Remove white-spaces from default arguments, - Adjusting white-spaces before inline comments, - Adding extra newlines when expected, - Adjust spaces for lines under-indented for visual indent, - Remove white-spaces from parenthesis, and adding them for arithmetic operators. Change-Id: I9cb28cefd114d63580b584a063c452f90d3ca885 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add support for Python 3.8Cristián Maureira-Fredes2019-10-241-1/+1
| | | | | Change-Id: I824085342694ac1cddc4db91dc6b95abdcc78122 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Include manylinux1 in package name for python2 builds on LinuxSimo Fält2018-07-111-7/+9
| | | | | Change-Id: I777cf3bd4f060610782fe6a09acd0e10ef713f0b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Minimize the wheel_override diffChristian Tismer2018-07-021-130/+132
| | | | | | | | | | | | | | | | | | | | | | For some shortcomings of bdist_wheel, it was necessary to write a modified wheel version. This patch reorders the parts a bit and avoids extra indentation to make it easier to compare the resulting diff to bdist_wheel.py with a simple compare tool like sublimerge. The semantics of the patch is not changed at all. The patch itself can be best inspected using a diff tool which ignores whitespace. ----- We should consider to submit a patch to python.org that has the necessary improvements for the wheel format, so we can get rid of this file. Change-Id: I1f54ad7cb93d64b57462311e5334c906e27d84a0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Prepare Limited API for Python 3.7Christian Tismer2018-06-261-1/+1
| | | | | | | | | | | | | | | PySide has successfully been tested with the Python 3.7 branch. There will be no change in the areas that are important for us. It is then safe to bump the supported version and the limited API version checks to fully include Python 3.7. The macro errors in the limited API was fixed by a pull request, but it was too late to get it into 3.7rc1. The error workaround was therefore extracted into pep384_issue33738.cpp and will be deactivated later. Change-Id: Iec3f277b02cac03a5cf44cbcf955ddc690c112e5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Current limited API packages won't work on Python 3.7 and 3.8Alexandru Croitor2018-06-061-1/+1
| | | | | | | | | | | | | This is intentional, because of verification code regarding Python buffers. So instead of lying, we remove those python version bits from the generated package name, aka instead of "cp35.cp36.cp37.cp38" it is now only "cp35.cp36". Change-Id: I2891f64e93821d3a3ccb693f28576c34d1365606 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Include manylinux1 in package name for limited API builds on LinuxAlexandru Croitor2018-05-311-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | PyPI only accepts binary Linux packages that are built conforming to PEP 513 / manylinux1 support. The gist of it is that extensions need to be built on CentOS 5, so that they work on most newer distro versions than that. Official Qt can't be built on such an old distro. The minimum requirement is thus CentOS / RHEL 7 (which we used for packaging Qt 5.11.0 on Coin). We do want to upload packages to PyPI, so we have to resort to including "manylinux1" in the name. Currently this is tied to the limited API option. TODO: In the future we should name packages "manylinux1" only when the distro version is acceptable for Qt build requirements (RHEL 7.x). It might get a bit messy though, due to platform.linux_distribution being deprecated, and the necessity to depend on the new "distro" package. Change-Id: Ic4dfccd87d810360cbbfce72b27d5fa31e2a59dd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Adjust wheel names when building with limited apiAlexandru Croitor2018-05-311-0/+186
Wheel has poor support for naming wheel packages that were built with limited API enabled. We need to override some of bdist_wheel's methods to generate a correct name and correct metadata. Move the pyside_bdist_wheel class into a separate file, and implement the necessary logic. Change-Id: I23d814cbb794052fb18a1e018f7b767c60945254 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>