aboutsummaryrefslogtreecommitdiffstats
path: root/build_scripts/platforms
Commit message (Collapse)AuthorAgeFilesLines
* Add mirror url to download MSVC redistributablesSimo Fält2021-01-221-1/+6
| | | | | | | Change-Id: If990cb45c2187cdfda5c41ea8b8123d803fa8934 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 63614c3085fa8105e9f8ced6b2d166c2a7a2c6e6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* build_scripts: use f-strings instead of format()Cristian Maureira-Fredes2021-01-042-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: remove unused importsCristian Maureira-Fredes2021-01-043-4/+2
| | | | | | | 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>
* designer: add rpath for linuxCristian Maureira-Fredes2020-12-211-4/+5
| | | | | | | | | | | | 'designer' was not on the list of tools that we modify to add a run path for linux. Fixes: PYSIDE-1457 Fixes: PYSIDE-1456 Change-Id: Idde477fb5012c5e61df0713ee07b42895be72ec2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 2c725e77c9cd25b38ea56accab3bdf46e15faf16) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* build scripts: Import 'PYSIDE' for linux platformSimo Fält2020-12-021-1/+1
| | | | | Change-Id: I08b665ae4feccc9b22b45da999150188228f29e2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Build scripts: Switch to Qt 6Friedemann Kleint2020-11-023-14/+14
| | | | | Change-Id: I40ba653f38bf079a697f0a509300a87e45181c30 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Fix the Windows buildFriedemann Kleint2020-11-021-1/+1
| | | | | | | Amends 559c56b140410bcfa0ce6f19b47d1ba0daa9a201. Change-Id: I1e41dcf0b4bf52d84a16a02b995cc9d7ec9c15f7 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Rename PySide2 to PySide6Friedemann Kleint2020-11-022-6/+6
| | | | | | | | Adapt CMake files, build scripts, tests and examples. Task-number: PYSIDE-904 Change-Id: I845f7b006e9ad274fed5444ec4c1f9dbe176ff88 Reviewed-by: Christian Tismer <tismer@stackless.com>
* build scripts: Introduce variables for the versionsFriedemann Kleint2020-11-024-20/+21
| | | | | Change-Id: Iac73fcf6e60f882968463d1c612f5ca5dc206222 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Rename shiboken2 to shiboken6Friedemann Kleint2020-10-283-13/+13
| | | | | | | | Adapt CMake files, build scripts, tests and examples. Task-number: PYSIDE-904 Change-Id: I4cb5ee4c8df539546014b08202a7b1e98ed3ff07 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* build_scripts: remove references to python 2Cristian Maureira-Fredes2020-10-272-11/+9
| | | | | | | | | * 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>
* Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2020-09-101-1/+5
|\ | | | | | | Change-Id: I8a627fd459c3f9601d078a00d3d77c8b3fe04304
| * One more fix for the missing win runtime libsSimo Fält2020-09-091-1/+5
| | | | | | | | | | | | | | Change-Id: Ic430a687a6d7af7ba45df51a34c6fe7c56b3799d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 275aba0c773e649f15c89e34f15310cb8fd35c09) Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | Remove QtWebKitCristián Maureira-Fredes2020-07-061-2/+0
| | | | | | | | | | | | | | | | Since it was deprecated in 5.5, it's time to remove it from the repository. Change-Id: I0835f04d6c34079dfc289be8027985a1dc3674bc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Remove pyside-toolsFriedemann Kleint2020-07-032-3/+2
|/ | | | | | | Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: Ice3fbbf2a47833d8bb8702b4b553c87df2d9757d Reviewed-by: Christian Tismer <tismer@stackless.com>
* Update vcredist binaries for MSVC 2019Simo Fält2020-06-151-2/+2
| | | | | | | Fixes: PYSIDE-1323 Change-Id: If3a3d885f277044d64e174dd597974ad11a3425a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 80d07788fbf4cdce72041b1d22a66e5f981034a1)
* Add missing Win runtime dll into win wheelsSimo Fält2020-06-151-1/+2
| | | | | | | Fixes: PYSIDE-1323 Change-Id: I2856c5388b66eb02b18004b894cac8db6c4be10a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 0467ea1c3ddbf81fe4ab9a5c521e1d41ea22481f)
* Support type checking with the mypy moduleChristian Tismer2020-04-172-2/+2
| | | | | | | | | | | | | | | According to PEP 561, there needs to exist a py.typed file. Also, the import of typing must be visible statically for mypy without importing PySide2. Testing.. run mypy pyside_1100.py and you will get the correct output without "any". Change-Id: I1d08447161630a8c7a64eda32ff8a431e994c6a7 Fixes: PYSIDE-1100 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Relax the build_scripts for macOS and designerChristian Tismer2020-04-061-2/+2
| | | | | | | | | | | The build_scripts are able to build Designer, optionally. For macOS, the optional status was forgotten. Instead of always patching the build_scripts, I finally fixed that buglet ;-) Change-Id: Iaa62e27253ec7035f0eebde17f0f2b8c4593be67 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* designer: patch rpath for unixCristián Maureira-Fredes2020-01-272-2/+20
| | | | | | | | | Designer is not statically compiled, so we need to add a RUNPATH to use the Qt libraries we ship with the wheel. Change-Id: I715fcd852b63da99104198be2a4587b042a1eab7 Fixes: PYSIDE-1165 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Replace OPTION_* by a dictionaryCristián Maureira-Fredes2019-12-032-5/+5
| | | | | | | | | | | | 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-254-115/+106
| | | | | | | | | | | | | | | | | - 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 designer to the pyside toolsCristián Maureira-Fredes2019-10-312-1/+14
| | | | | | | Fixes: PYSIDE-1001 Fixes: PYSIDE-1068 Change-Id: I0969cd234331789b300c8dc521ab6bbf84004d1d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* build scripts: Fix arguments handlingFriedemann Kleint2019-10-302-2/+2
| | | | | | | Properly pass lists to regenerate_qt_resources(). Change-Id: I8cdd388b02a247dde915f14b21e3f3770a0c64a1 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Replace pyside2 uic/rccCristián Maureira-Fredes2019-10-252-38/+7
| | | | | | | | | | | | | | | | | | | | | After the compatibility patches for uic and rcc, is now possible to generate Python code by using the option '-g python': uic -g python file.ui -o ui_file.py rcc -g python file.qrc -o rc_file.py This patch depends on many changes on the 'pyside2-tools' submodule, which mainly remove the old implementations of pyside2-uic and pyside2-rcc. The pyside_tool.py wrapper is now in charge of calling the uic and rcc binaries, with the -g python every time the pyside2-uic and pyside2-rcc binaries are called. To achieve this, we are now shipping the uic and rcc binaries from the Qt installation. Fixes: PYSIDE-1098 Change-Id: Ibdec0012f7ed671cd99424e1258c20649609c2da Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Use correct environment variable to detect when running in CoinAlexandru Croitor2019-04-081-2/+2
| | | | | | | | | | | | | | | | | | The code for shipping MSVC redist dlls used to check for the "QTEST_ENVIRONMENT" environment variable to decide when to download and extract the libraries. This was incorrect, because it is only set in a Coin test phase, and not when building the project. Revert to using the old "COIN_LAUNCH_PARAMETERS" environment variable which is set during the Coin build phase. Amends 9e13465a992a5079c0a038e5f9417896dcfd6f3a . Fixes: PYSIDE-993 Change-Id: I96d1e010ffc4b3a5951bdd28699f657e3a5f4a3f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Log for debug purposes whenever MSVC redist is not downloadedAlexandru Croitor2019-04-081-0/+2
| | | | | | | | | Will be easier to see from Coin logs when it happens. Task-number: PYSIDE-993 Change-Id: I5eeb36c32be2e2e6c32eb8a5d7136797d4a925a2 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix environment check regarding msvc redist libraries, take 2Friedemann Kleint2019-02-111-1/+1
| | | | | | | Check the bool value. Amends 263df6601717b52237f62c08ad1f6bc536093e45 Change-Id: Ibcca3e34477da80999e87918ff03cf1639bc40d5 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix environment check regarding msvc redist librariesAlexandru Croitor2019-02-061-2/+1
| | | | | | | | Empty string is not the same as None. This caused the redist libraries to always be downloaded. Change-Id: Ib4951ba0e56c87749aa85cb3b815ce222ecb95cd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Avoid __pycache__ directoriesCristian Maureira-Fredes2019-02-062-2/+12
| | | | | | | | We are currently shipping the __pycache__ directory of the examples, so this filter will remove them. Change-Id: Ia387108d8867cf08f8bfc2677f166fb33b521ad5 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Include MSVC dlls in the shiboken module packageAlexandru Croitor2019-01-311-22/+41
| | | | | | | | | | | | | The libshiboken library uses C++ code, therefore we have to ship the MSVC redistributable DLLs along with it. They were distributed before for the shiboken2-generator package, but not for the module package. Amends 43fe3494a9d902034896e3afa7b5158c77163be0 Fixes: PYSIDE-914 Change-Id: I5981bfbcf3316e7742a0854051ddbd3b4bf4a938 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Generate Hinting Stubs AutomaticallyChristian Tismer2018-12-032-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The script is now automatically called in the cmake build, as part of the create_pyside_module macro. The script runs after every module build and tries to generate .pyi files. This does not need to succeed, but will generate all files in the end. The script has been prepared to allow partial runs without overhead. After integration of the .pyi generation into cmake, these files are also installed into the install directory by cmake. For wheel building, setup.py has entries, too. Building a full project with all modules revealed a bug in the signature module that allowed unsupported function objects. Module enum_sig had to be changed to suppress types which have no ancestry in shiboken. PYTHONPATH was avoided because it was not Windows compatible. Instead, the script was changed to accept "--sys-path" and "--lib-path" parameters. The latter evaluates either to PATH or LD_LIBRARY_PATH. The necessity to create .pyi files while the project is in the build process showed a hard to track down error condition in PySide_BuildSignatureProps. Simple logging was added as a start of introducing logging everywhere. Task-number: PYSIDE-735 Change-Id: I6b3eec4b823d026583e902023badedeb06fe0961 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Install snippets glue codeCristian Maureira-Fredes2018-11-282-0/+14
| | | | | | | | | | | | | The module-specific glue files as well as the standalone glue files are now installed into the PySide2 package. The glue files are now also listed as dependencies for the shiboken generator run, which means that modifying those files will now correctly force a shiboken re-run for the relevant modules. Change-Id: I545c7ada379fafb7f225d0b0f5ce495bf6d4795d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Allow building shiboken2 and PySide2 as separate wheelsAlexandru Croitor2018-10-124-407/+577
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Actually this creates 3 wheel packages: - shiboken2 (the python module and libshiboken shared library) - shiboken2-generator (contains the generator executable, libclang and dependent Qt libraries) - PySide2 (the PySide2 modules and Qt shared libraries, and tools like rcc, uic) Calling the setup.py script will not do the actual build now (in the sense of calling CMake, make, etc.). Instead it will spawn new processes (via subprocess.call) calling the same setup.py script, but with different arguments. These "sub-invocations" will do the actual building. Thus, the "top-level invocation" will decide which packages to build and delegate that to the "sub-invocations" of setup.py. A new optional command line argument is introduced called "--build-type" which defaults to "all", and can also be set to "shiboken2", "shiboken2-generator" and "pyside2". A user can choose which packages to build using this option. The "top-level invocation" uses this option to decide how many "sub-invocations" to execute. A new command line argument called "--internal-build-type" takes the same values as the one above. It defines which package will actually be built in the new spawned "sub-invocation" process. The "top-level invocation" sets this automatically for each "sub-invocation" depending on the value of "--build-type". This option is also useful for developers that may want to debug the python building code in the "sub-invocation". Developers can set this manually via the command line, and thus avoid the process spawning indirection. A new class Config is introduced to facilitate storage of the various state needed for building a single package. A new class SetupRunner is introduced that takes care of the "--build-type" and "--internal-build-type" argument handling and delegation of "sub-invocations". A new class Options is introduced to 'hopefully', in the future, streamline the mess of option handling that we currently have. setup.py now is now simplified to mostly just call SetupRunner.run_setup(). Certain refactorings were done to facilitate further clean-up of the build code, the current code is definitely not the end all be all. Various other changes that were needed to implement the wheel separation: - a new cmake_helpers directory is added to share common cmake code between packages. - the custom popenasync.py file is removed in favor of using subprocess.call in as many places as possible, and thus avoid 10 different functions for process creation. - Manifest.in is removed, because copying to the setuptools build dir is now done directly by prepare_packages functions. - because prepare_packages copies directly to the setuptools build dir, avoiding the pyside_package dir, we do less copying of big Qt files now. - versioning of PySide2 and shiboken2 packages is now separate. shiboken2 and shiboken2-generator share the same versions for now though. - shiboken2 is now listed as a required package for PySide2, to facilitate pip requirements.txt dependencies. - coin_build_instructions currently needs to install an unreleased version of wheel, due to a bug that breaks installation of generated wheel files. - added separate command line options to pyside2_config.py for shiboken2-module and shiboken2-generator. - adapted samplebinding and scriptableapplication projects due to shiboken being a separate package. - adapted pyside2-tool and shiboken2-tool python scripts for setup tools entry points. - made some optimizations not to invoke cmake for shiboken2-generator when doing a top-level "all" build. - fixed unnecessary rpaths not to be included on Linux (mainly the Qt rpaths). Task-nubmer: PYSIDE-749 Change-Id: I0336043955624c1d12ed254802c442608cced5fb Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Add entry points for native toolsSimo Fält2018-10-022-0/+10
| | | | | | Task-number: PYSIDE-779 Change-Id: I3888ba58f186a2fca84414fed3243a41650f6774 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Build script/Linux: Use installed patchelf if presentFriedemann Kleint2018-07-241-1/+1
| | | | | | | | | | Add path search helper and use installed patchelf instead of building the contained source. Task-number: PYSIDE-740 Change-Id: I8043aa58ff9ebc4884eee9f15745865f10bb30fe Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Extract Qt Win dependencies to be included in wheelsSimo Fält2018-06-251-0/+23
| | | | | | Task-number: PYSIDE-696 Change-Id: I20a4f80acceee5c056217a6c92e3b494ec34020d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Don't package qml plugin debug symbols on LinuxAlexandru Croitor2018-05-251-0/+1
| | | | | | | | | | | Amends 6f894c2667c77e2580e7312d2ebed05efa7d654e. Reduces Qt 5.11.0 Linux wheel size from ~219MB to ~139MB (~80MB delta). Task-number: PYSIDE-661 Change-Id: Iaae1089183148037d94fe541f26426fd51c0f54d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Reduce generated package size by removing unnecessary filesAlexandru Croitor2018-05-142-9/+51
| | | | | | | | | | 1) Don't copy pdb files for QML plugins on Windows 2) Don't copy debug variants of EGL library on Windows 3) Don't copy debug variants of shared libraries on macOS Task-number: PYSIDE-661 Change-Id: I37c701f3b12f3ad08fbdd24ab70587132ddc0c95 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Change license from all the filesCristian Maureira-Fredes2018-05-035-5/+5
| | | | | | | | | | | | | | | | | Removing the word 'project' from all the headers, and changing the PySide reference from the examples to Qt for Python: The following line was used inside the source/ and build_scripts/ directory: for i in $(grep -r "the Qt for Python project" * |grep -v "pyside2-tools" | awk '{print $1}' | sed 's/:.*//g');do sed -i 's/the\ Qt\ for\ Python\ project/Qt\ for\ Python/g' $i;done and the following line was used inside the examples/ directory: for i in $(grep -r "of the PySide" * |grep -v "pyside2-tools" | awk '{print $1}' | sed 's/:.*//g');do sed -i 's/of\ the\ PySide/of\ the\ Qt\ for\ Python/g' $i;done Change-Id: Ic480714686ad62ac4d81c670f87f1c2033d4ffa1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Split and move various setup.py parts into different filesAlexandru Croitor2018-04-305-0/+798
This is an initial effort to clean up setup.py. A new directory called build_scripts contains most of the logic for building, leaving setup.py as an entry point. The build_scripts directory contains the usual qtinfo, utils, and the setup.py content has been split into main.py and platform specific files under platforms subfolder. The testrunner script has been modified to find the new location of the utils module. Task-number: PYSIDE-558 Change-Id: I3e041d5116ca5c3f96c789317303b65a7b1bbd70 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>