aboutsummaryrefslogtreecommitdiffstats
path: root/build_scripts/options.py
Commit message (Collapse)AuthorAgeFilesLines
* Python-3.10: Allow the new syntax for Python 3.9Christian Tismer2024-06-201-0/+1
| | | | | | | | Add a future statement to all Python source files. Task-number: PYSIDE-2786 Change-Id: Icd6688c7795a9e16fdcaa829686d57792df27690 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Remove deprecated command 'build_rst_docs'Dennis Oberst2024-04-121-6/+4
| | | | | | | | | | | ... has been removed in favor of 'build_base_docs'. [ChangeLog][PySide6] 'build_rst_docs' has been removed in favor of 'build_base_docs'. Fixes: PYSIDE-2504 Change-Id: I2abcd6d1cef8c6b6095c9f25500380adc748ab83 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* build scripts: Use log.warning() instead of deprecated log.warn()Friedemann Kleint2024-03-071-4/+4
| | | | | Change-Id: I5c3b0bdedd35bf98c110c2885c8ba35a4f418c61 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Make Unity builds defaultFriedemann Kleint2024-01-301-2/+7
| | | | | | | | | | [ChangeLog][PySide6] setup.py now uses CMake Unity Build Mode by default. Change-Id: I50c892646c73ac636276460b0a1efa558531c76d Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Help fix: remove the extra '-' from --macos-use-libc++Shyamnath Premnadh2024-01-251-1/+1
| | | | | | Pick-to: 6.2 6.5 6.6 Change-Id: I6085b6fc651223eaec9a860abd61b39387f9643e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* build scripts: Deprecate option --ignore_gitFriedemann Kleint2024-01-181-1/+2
| | | | | Change-Id: Ia81680cc19efbab75c517a4c20d4f83445c84e6c Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* shiboken: Allow to disable pyi file generation for debuggingChristian Tismer2024-01-171-6/+9
| | | | | | | | | | | | | When developing difficult stuff like Lazy Initialization, it is convenient to have an option that ignores PYI generation. This way, translation can be successful, and pyi generation can then be debugged. Task-number: PYSIDE-2404 Change-Id: I68bd10af3754de3988556c4558d1331564f5dadb Pick-to: 6.6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* docs: deprecate 'build_rst_docs' in favor of 'build_base_docs'Dennis Oberst2023-10-261-4/+7
| | | | | | | | | | | | | | | | | | | The command for building documentation files has been renamed to 'build_base_docs' and the previous command, 'build_rst_docs', has been deprecated. All relevant occurrences of the command have been updated accordingly. In addition, the documentation config and build directory 'build/pyside6/doc/rst' has been renamed to 'build/pyside6/doc/base'. To ensure a fresh start when generating new documentation, the auto-generated `examples` and `html` directories are now deleted before generating new documentation. This change has been made because these directories are generated anyway, and starting fresh ensures that there are no conflicts or issues with the new documentation. Task-number: PYSIDE-2504 Change-Id: I395ad7e9482b0b68311820d58da362513ebb44b2 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* build: remove traces of distutilsCristián Maureira-Fredes2023-07-141-8/+2
| | | | | | | | | | | | | | | Removed mentions, comments, and fallback usages in some sections of the build scripts and documentation. On the CI, we upgrade setuptools in order to avoid having missing functionality, so it shouldn't be an issue. For Shiboken and CMake, there is still a helper that relies on distutils in case people is using python < 3.8.2 Pick-to: 6.5 Change-Id: Ic33abe9fa8bd8564e9d44c8714b7fedd4e50434a Reviewed-by: Simo Fält <simo.falt@qt.io>
* build: remove examples from wheels and installationCristián Maureira-Fredes2023-03-211-3/+1
| | | | | | | | | | | | | | | | | | To reduce the size and cluttering of wheels and installations the examples are not including any longer. The recommended way to get examples now is to download them directly from the Example Gallery in the documentation page. The option no-examples was removed. [ChangeLog][pyside6] Examples are not included in the wheels anymore and the option no-example was removed. Change-Id: I94fb24f9ffd6c55e2762e7c2e380b0f0ffe0bf61 Fixes: PYSIDE-2247 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Android Deployment - cross building for android wheelsShyamnath Premnadh2023-03-061-0/+2
| | | | | | | | | | | | | | | | | | | | - basically controls what goes into the android wheels - presently restricted to Qt essential modules - controlled using the --plat_name=android_aarch64, --plat_name=android_armv7 etc - the libQt6*.so libraries in Android do not have the version in the end.This is the same for all the Android Qt installations. Hence we look for libQt6*.so* instead of libQt6*.so.? - folders like 'glue', 'typesystems', 'support' are not relevant for for cross compiled wheels because shiboken6_generator is not cross compiled - for Android cross compilation, the 'examples' folder is also not relevant in addition to the above folder Task-number: PYSIDE-1612 Change-Id: Icc7561a6e990ed9b080f55cb30bac34e4774be7f Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* doc: fix build when qtpaths is in PATHCristián Maureira-Fredes2023-02-161-1/+2
| | | | | | | | | | | | | | | | | It seems that the previous changes: bf73772d2c43a71d13a55e9914c631591cd01815 to determinate qtpaths earlier in the build didn't consider the case where setup.py build_rst_docs was called with qtpaths in PATH, so this skip the process for this subcommand. Pick-to: 6.4 Change-Id: I89a28950a6416993ece204cc1b2eb3300165a272 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* PySide Build: find qtpaths before SetupRunner.run_setup()Shyamnath Premnadh2023-02-081-25/+49
| | | | | | | | | | | | | | | | | | | | - 'qtpaths' needs to be known while setting up the corresponding setup.py command to ignore the pyside qt wrapper tools whose qt tool does not exist - This is an extension to 43109854a2966afe2e0cf29961157a6f54d5775c. The aforementioned patch led to qtpaths being found 2 times, once inside CommandMixin class and also much before that inside SetupRunner.run_setup(). This redundancy is now removed by moving the finding of OPTION['QTPATHS'] outside the mixin and before CommandMixin object of the command being run is initialized - the help commands, build_rst_docs and cross compilation command should not complain about qtpaths anymore - fixed cross compilation build Task-number: PYSIDE-2195 Change-Id: I862baf954dea0a3bdaf5ddf411f119178b457c42 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* build: introduce log levelCristián Maureira-Fredes2023-02-021-7/+44
| | | | | | | | | | | | | | | | | | | | | | | | Removed the "quiet" and "verbose" older approach, and introduced a 3-level configuration so we can switch between them depending of the amount of output we need. By default, the log level is set to INFO, but it can be changed to VERBOSE and QUIET. The older "--verbose-build" and "--quiet" options were deprecated. The new way for setting the log level is: --log-level=quiet --log-level=verbose --log-level=info (default) The default option was made less verbose, controlling the output of the logging module, and cmake: for verbose it uses DEBUG, quiet uses ERROR, and no option uses INFO. Change-Id: Ida0289e3ea0ed09b7489a7513254137bba186fd0 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Build system: Add an option to enable CMake UNITY_BUILD (jumbo) buildsFriedemann Kleint2022-12-191-0/+6
| | | | | | | | | | [ChangeLog] An option --unity has been added to setup.py enabling enabling CMake UNITY_BUILD (jumbo) builds, which speeds up building. Fixes: PYSIDE-2155 Change-Id: I235a18335d6070bc3eb4ea7f9953925f6d9e174c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* build_scripts: remove unused importsCristián Maureira-Fredes2022-12-191-1/+0
| | | | | | | | | | Many leftovers from the pathlib migration patches. Pick-to: 6.4 Change-Id: I7126fadbe45dbb387bc8948ba777cb690f10a758 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* build system: Fix --cmake command line optionFriedemann Kleint2022-12-081-0/+2
| | | | | | | | | Amends 2afcf8e7545c681e412e5b6d04ab8867e5edd5c7. Task-number: PYSIDE-2080 Change-Id: I8d9d26ca772d1f380da34d31ac5511698b554a9b Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Enable debug builds on WindowsFriedemann Kleint2022-11-171-1/+1
| | | | | | | | | | Fix check in error message introduced by 72107fc39f15e3827297530dfad3c63f8e4ffcaa. Pick-to: 6.4 6.4.1 Change-Id: Ie6690d84d5f6aa83ebcca8517b90627ecce4b746 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix debug build problems on Win re: limited-apiAdrian Herrmann2022-11-161-0/+5
| | | | | | | | | | | | | | | | | | There is a build error on Windows when limited-api=yes and debug where the linker does not know the right paths to look for libraries. Supporting this configuration is not desirable anyway because there are no released Python builds on Windows with this configuration. Therefore: 1. Display a warning to the user that the combination debug + limited=api=yes does not really "exist" if they choose it explicitly on Windows. 2. Have the default for debug builds be limited-api=no on Windows. Pick-to: 6.4 Change-Id: Ifed99f80abb02c9d512a1321526e949d56ff08a6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* build_scripts: Don't use options from the environmentFriedemann Kleint2022-11-151-7/+2
| | | | | | | | | | | | | | | | This can cause issues for cross builds, particularly for cmake-toolchain-file. Affected options are: build-type, cmake-toolchain-file, internal-build-type, internal-shiboken-host-path-query-file, jobs, limited-api, package-timestamp, parallel, prefix, qt-host-path, shiboken-host-path. Task-number: PYSIDE-802 Task-number: PYSIDE-962 Change-Id: Icd48d56c66df79bcc2e203290ee5a7a0fb930529 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Build system: Check for qtpaths6 onlyFriedemann Kleint2022-11-081-2/+0
| | | | | | | | | | | When building against a system Qt version on Linux, searching for qtpaths first might find a Qt 5 version, causing a misleading error message. Searching for both cannot work since which() throws on failure. Change-Id: Ifec2e880cec79c9b0ce978808051e2d4dae8b0d2 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Build system: Fix cross buildsFriedemann Kleint2022-11-081-4/+3
| | | | | | | | | | | | | | | | | | Move the conversion of Options.self.qt_target_path to Path up, fixing: File "pyside-setup_was/build_scripts/options.py", line 333, in _do_finalize if not self._determine_defaults_and_check(): File "pyside-setup_was/build_scripts/options.py", line 510, in _determine_defaults_and_check if self.qt_target_path and not self.qt_target_path.exists(): AttributeError: 'str' object has no attribute 'exists' Amends 2afcf8e7545c681e412e5b6d04ab8867e5edd5c7. Task-number: PYSIDE-2080 Change-Id: I4fe2bc7dcef1f8ff76c3e8e1353b4ca5afe7d596 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* pathlib: migrate build_scripts away from os.pathCristián Maureira-Fredes2022-10-181-14/+20
| | | | | | | | | There is a usage of os.path.relpath that cannot be migrated to pathlib, which remain the only usage of os.path Task-number: PYSIDE-2080 Change-Id: Iac781e9c9324fb8b9d3559b4225912d56782072a Reviewed-by: Christian Tismer <tismer@stackless.com>
* build: rename DistUtilsCommandMixin to CommandMixinCristián Maureira-Fredes2022-10-131-7/+7
| | | | | | | | Renamed to avoid confusion related to distutil usage. Task-number: PYSIDE-2079 Change-Id: Idf6a8b64835be34a1e92032bd3b18b8eafe28e3e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* build: replace distutils.cmd.Command and sysconfigCristián Maureira-Fredes2022-10-131-1/+1
| | | | | | | | | | | | | Replaced various dsitutils leftovers: - distutils.cmd.Command by setuptools.Command - distutils.command.build by setuptools.command.build - distutils.sysconfig.get_python_lib(1) by sysconfig.get_paths()['platlib'] Task-number: PYSIDE-2079 Change-Id: Ia694629476f25019f4a9f8d3b306b0367a5cdb08 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* build: replace distutils.log by simple loggerCristián Maureira-Fredes2022-10-131-3/+3
| | | | | | | | | | Adding simple logger based on the logging module to replace the distutils.log one. Task-number: PYSIDE-2079 Change-Id: I2a4996a57be701552005b57d2b1a251b9fc44c41 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* build: fix readability detailsCristián Maureira-Fredes2022-06-291-4/+4
| | | | | | | | | | | | | | Removing some leftover common anti-patterns: - remove unnecessary dict() usage - remove unnecessary map() - avoid index-based loops - use capitalize() instead of index-based capitalization - use f-strings for concatenation Pick-to: 6.2 6.3 Change-Id: I0ffdf73ec47c6ef537789015052dea0fd047350d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-271-38/+2
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: I065150015bdb84a3096b5b39c061cf0a20ab637d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Enable numpy support by defaultFriedemann Kleint2022-05-171-1/+8
| | | | | | | | | | | | | | | | | | | | | | This effectively undoes 36431b071095b8999347df87621bf23ffcc2ac3d which disabled numpy support in libpyside due to - break cx_freeeze - Cause embedding applications to fail to load with "undefined symbol: PyExc_RecursionError" Auto-detection along with --enable/--disable options is introduced instead. All numpy code is now located in libshiboken and it cleanly recovers when numpy cannot be found on the target system. The PyExc_RecursionError issue could not longer be reproduced. [ChangeLog][PySide6] Numpy support is now enabled by default. Task-number: PYSIDE-1924 Change-Id: I0fdb3612471971afa49ac3141845cf5d6dbfa7e0 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* flake8: fix style issues to build_scripts/Cristián Maureira-Fredes2022-04-131-5/+6
| | | | | | Pick-to: 6.3 Change-Id: Ie56b054ca32869a488356b31eea49cc985fc463e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* PySide6: Optimize for SizeShyamnath Premnadh2022-04-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | build: use the following flag with setup.py to turn off size optimization --no-size-optimization Added the following compiler optimization flags and their corresponding flags on other platforms GCC - -ffunction-sections -fdata-section which segretates data and function section and linker flag --gc-section which removes unused code. - -fno-exceptions to disable exception handling - -Os - Optimize for size. Basically same as -O2 but removes some flags that cause increase in size. (Ran a couple of example and did not see difference in execution time) MSVC - /Gy /Gw /OPT:REF - same as -ffunction-sections, -fdata-section, -Wl, --gc-section - /EHsc same as -fno-exceptions - /O1 instead of /Os because for MSVC /O1 gave the best results. Clang - Same as GCC except for using -Oz instead of -Os. Experiments: Built a wheel with QtCore and noticed a 300kb reduction in size on both Windows and Linux. Built a complete wheel(except QTest) and it gives me a 4 mb size reduction with unaffected performance. Task-number: PYSIDE-1860 Change-Id: Ia5dfa2c4bfde92994c939b5fac0d0831fa3a73ab Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* doc: skip the documentation build by defaultCristián Maureira-Fredes2022-04-091-1/+4
| | | | | | | | | | | | | This reverse the current approach of building the documentation by default, and replace the skip-docs parameter by a build-docs one. A warning is printed when the --skip-docs is used, and another warning is displayed when using --doc-build-online without the --build-docs option. Change-Id: I2bf8302881b51e9831795a7e881b106022cdffa8 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* flake8: improve codestyling of build scriptsCristián Maureira-Fredes2022-03-221-3/+2
| | | | | | | | | | | - Fixing f-strings - Fixing indentation of some lines - Removing unused variables and imports - Changing the way of verifying if sphinx is installed Change-Id: I3f361759682324c9b0c9d33c24583435f137f05a Pick-to: 6.2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Strip libraries in release modeFriedemann Kleint2022-03-141-0/+3
| | | | | | | | | [ChangeLog][PySide6] Libraries are now stripped. Task-number: PYSIDE-661 Change-Id: I20ea056b8e91cca917017afa62811208c297d51d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* setup.py: Add support for cross-buildingAlexandru Croitor2022-02-041-34/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | setup.py can now be used to cross-compile PySide to a target Linux distribution from a Linux host. For example you could cross-compile PySide targeting an arm64 Raspberry Pi4 sysroot on an Ubuntu x86_64 host machine. Cross-compiling PySide has a few requirements: - a sysroot to cross-compile against, with a pre-installed Qt, Python interpreter, library and development packages (which provides C++ headers) - a host Qt installation of the same version that is in the target sysroot - a host Python installation, preferably of the same version as the target one (to run setup.py) - a working cross-compiling toolchain (cross-compiler, linker, etc) - a custom written CMake toolchain file - CMake version 3.17+ - Qt version 6.3+ The CMake toolchain file is required to set up all the relevant cross-compilation information: where the sysroot is, where the toolchain is, the compiler name, compiler flags, etc. Once are requirements are met, to cross-compile one has to specify a few additional options when calling setup.py: the path to the cmake toolchain file, the path to the host Qt installation and the target python platform name. An example setup.py invocation to build a wheel for an armv7 machine might look like the following: python setup.py bdist_wheel --parallel=8 --ignore-git --reuse-build --cmake-toolchain-file=$PWD/rpi/toolchain_armv7.cmake --qt-host-path=/opt/Qt/6.3.0/gcc_64 --plat-name=linux_armv7l --limited-api=yes --standalone Sample platform names that can be used are: linux_armv7, linux_aarch64. If the auto-detection code fails to find the target Python or Qt installation, one can specify their location by providing the --python-target-path=<path> and --qt-target-path=<path> options to setup.py. If the automatic build of the host shiboken code generator fails, one can specify the path to a custom built host shiboken via the --shiboken-host-path option. Documentation about the build process and a sample CMake toolchain file will be added in a separate change. Implementation details. Internally, setup.py will build a host shiboken executable using the provided host Qt path, and then use it for the cross-build. This is achieved via an extra setup.py sub-invocation with some heuristics on which options should be passed to the sub-invocation. The host shiboken is not included in the target wheels. Introspection of where the host / target Qt and Python are located is done via CMake compile tests, because we can't query information from a qmake that is built for a different architecture / platform. When limited API is enabled, we modify the wheel name to contain the manylinux2014 tag, despite the wheel not fully qualifying for that tag. When copying the Qt libraries / plugins from the target sysroot in a standalone build, we need to adjust all their rpaths to match the destination directory layout of the wheel. Fixes: PYSIDE-802 Task-number: PYSIDE-1033 Change-Id: I6e8c51ef5127d85949de650396d615ca95194db0 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* setup.py: Deprecate qmake option in favor of qtpathsAlexandru Croitor2021-12-071-0/+1
| | | | | | | | | | | | | | | | | | The setup.py --qmake option is deprecated starting with Qt 6.3 and will likely be removed in Qt 6.4. The --qtpaths option should be used instead. Change Coin build instructions to use qtpaths. Documentation builds should also be adapted. Coin test instructions still use qmake for wheel_tester.py [ChangeLog][setup.py] The setup.py --qmake option is deprecated starting with Qt 6.3. Use the --qtpaths option instead. Change-Id: I0f5661162f70b38ce0c9939620e7dbb3151050fd Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* setup.py: Simplify logic of qmake and qtpaths lookupAlexandru Croitor2021-11-291-32/+21
| | | | | | | | | | | | | | | | | | If an explicit qmake or qtpaths option is given, use it to determine the Qt prefix dir. If no option is specified, try to find qtpaths in PATH. Don't try to find the sibling tool as we did before this change, there's no benefit in doing that. Either one can be used to query the required Qt information. Make sure to log both tool paths. Amends 3b4764fefbb349eafb831b5da90f565b34c77a52 Pick-to: 6.2 Change-Id: I03afaa8d8476b3d09affdde28f3ff6f1fdf652b6 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Move from distutils to setuptoolsCristián Maureira-Fredes2021-11-261-5/+11
| | | | | | | | | | This is motivated by the deprecation of distutils, and removal in future versions https://github.com/pypa/packaging-problems/issues/127 Pick-to: 6.2 Change-Id: I16448b69f98df6dc1d9a904b69eb69ed5f1093f5 Reviewed-by: Christian Tismer <tismer@stackless.com>
* setup: coin: Use sccache when building if the platform config sets itAlexandru Croitor2021-11-151-0/+3
| | | | | | | | | | | | Set the CI_USE_SCCACHE env var if the sccache feature is enabled for the platform config. Pipe that through coin_build_instructions.py to setup.py. Add the relevant CMake cache vars so sccache is used. Pick-to: 6.2 Change-Id: I02d7ff0646791a5f0d2f1dd5c4a119ee016a9896 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* setup.py: Allow specifying Qt without adding it to PATHAlexandru Croitor2021-10-271-11/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix setup.py to allow specifying Qt either via --qtpaths or --qmake options. Previously if only one of the options were provided, the build would fail saying that the other option was not provided. Instead, only fail if neither options were provided. Reconstruct the path to the missing tool based on the path of the one that was provided. Prefer qtpaths, because the qmake option is deprecated. Even if both --qtpaths and --qmake options were provided to setup.py, the build would still fail when running _get_cmake_mkspecs_variables because it couldn't find a Qt package. The CMake project that is configured in that function depended on PATH being set to Qt's prefix, which CMake's find_package would then pick up. Explicitly pass the Qt prefix via CMAKE_PREFIX_PATH when configuring the project. Pick-to: 6.2 Change-Id: Ibd0cb35f8902e3d795c308c9c755a342118b0848 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Introduce qtpaths as qmake replacementFriedemann Kleint2021-06-171-3/+24
| | | | | | | | | | | | | | qtpaths has become the recommended tool for querying Qt properties (see qtbase/fef850c51a069ed89ba400e6ffccbbea4b0cbb9f). Deprecate the --qmake option in favor of it and use qtpaths for the values. qmake is only used if a path is given on the command line. [ChangeLog][PySide6] qtpaths is now used to query Qt properties. Task-number: QTBUG-75870 Change-Id: I9a29b05d8b6e982647eeeeeda0134ddc807da141 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* build scripts: Replace qmake mkspec parsing by cmakeFriedemann Kleint2021-06-171-1/+1
| | | | | | | | | | Determine build type and macOS target by creating a cmake dummy project instead of a qmake one. Task-number: QTBUG-75870 Change-Id: Ia25124e42dd10bf503f7e613b0edcec88a005633 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* build scripts: Remove qtchooser handlingFriedemann Kleint2021-06-161-1/+1
| | | | | | | | | qtchooser does not exist in Qt 6. Change _qmake_command to a string. Task-number: QTBUG-75870 Pick-to: 6.1 Change-Id: I6eb69fbd839567ba0e67c9d792666662126494cc Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Turn off numpy support in libpyside by defaultFriedemann Kleint2021-05-051-1/+5
| | | | | | | | | | | | | | Add a configure parameter for it and mark it as experimental. It has been found to: - break cx_freeeze - Cause embedding applications to fail to load with "undefined symbol: PyExc_RecursionError" Pick-to: 6.1 6.1.0 Task-number: PYSIDE-1540 Task-number: PYSIDE-1503 Task-number: PYSIDE-1455 Change-Id: I72fa4a3324a37eb996c42b83dce55fe1990b6fc3 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Add an option to disable copying of the Qt toolsFriedemann Kleint2021-03-161-1/+4
| | | | | | Fixes: PYSIDE-1518 Change-Id: Ida9982b9349bb5c34af671a9027aa90e9c87a02a Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Add option for switching the protected hackFriedemann Kleint2021-02-041-0/+3
| | | | | | | It is useful to test it on non-Windows platforms as well. Change-Id: I6886900e9f619250c4281f2012d2c14bd7310a4c Reviewed-by: Christian Tismer <tismer@stackless.com>
* build_scripts: use f-strings instead of format()Cristian Maureira-Fredes2021-01-041-6/+6
| | | | | | | Pick-to: 6.0 Change-Id: I165e9a39f968f67f9eae3a632739908d5f8fda59 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* build_scripts: replace print by distutils.logCristian Maureira-Fredes2021-01-041-7/+7
| | | | | | Pick-to: 6.0 Change-Id: I1106598719b48650847b08637e0caf6677cb26a0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* python3: remove all obsolete "from __future__" import statementsChristian Tismer2020-11-091-1/+0
| | | | | | | | | | | Note that not all future statements can be removed: PEP 563 for instance deals with from __future__ import annotations Task-number: PYSIDE-904 Change-Id: Ia387ec87f3c68ca64d13e8e80191eda900f58638 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* setup.py: Make ninja the default generatorFriedemann Kleint2020-10-261-2/+2
| | | | | | | | It is recommended for use with Qt 6. As a drive by, fix invalid parameter in error message. Change-Id: I7d01a2b70b9033fa827f34fffece0368c1a5462a Reviewed-by: Christian Tismer <tismer@stackless.com>