aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Change the default behavior CMAKE_BUILD_TYPEJulien Schueller2019-06-061-1/+1
| | | | | | | | | | | | | | | | | Instead of setting CMAKE_BUILD_TYPE as a regular variable, set it as a cache value, but only as a default. If the user specifies -DCMAKE_BUILD_TYPE=Foo on the command line, that will take priority. PySide2 will inherit the build type from the shiboken build, also unless explicitly specified on the command line. Fix missing quotes around the build type in shiboken_helpers.cmake. Task-number: PYSIDE-980 Change-Id: I2f7e5f71b66467ca5b30056c42d26d9a54ff265b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Add PySide2: Add OpenGL version functions as separate moduleFriedemann Kleint2019-05-021-5/+8
| | | | | | | | | The OpenGL version functions produce a lot of library code, so, add them as a separate module. Task-number: PYSIDE-955 Change-Id: I44737f4741f0a81f46a192961173e154ae66698e Reviewed-by: Christian Tismer <tismer@stackless.com>
* Modernize cmake buildAlexandru Croitor2019-02-071-111/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a CMake super project that includes the shiboken2, PySide2 and pyside2-tools subprojects, so that it's possible to build everything from Qt Creator (or any other IDE that supports CMake) with minimal set up effort, and thus inform the IDE CMake integration of all relevant files, for easier code editing, navigation and refactoring. This also lays the foundation for allowing 3rd parties to use the shiboken2 generator to generate custom modules. This is achieved by eliminating various hardcoded paths for libraries and include directories. Start using CMake targets throughout the build code to correctly propagate link flags and include dirs for libshiboken and shiboken2 executable targets. Same for the libpyside target. Generate two separate cmake config files (build-tree / install-tree) that can be used with find_package(Shiboken2), to make sure that the PySide2 project can be built as part of the super project build. This is currently the only way I've found to allow the super build to work. Note that for the build-tree find_package() to work, the CMAKE_MODULE_PATH has to be adjusted in the super project file. The generated config files contain variables and logic that allow usage of the installed shiboken package in downstream projects (PySide2). This involves things like getting the includes and libraries for the currently found python interpreter, the shiboken build type (release or debug), was shiboken built with limited api support, etc. Generate 2 separate (build-tree and install-tree) config files for PySide2, similar to how it's done for the shiboken case, for pyside2-tools to build correctly. Install shiboken2 target files using install(EXPORT) to allow building PySide2 with an installed Shiboken2 package (as opposed to one that is built as part of the super project). Same with PySide2 targets for pyside2-tools subproject. Make sure not to redefine uninstall targets if they are already defined. Add a --shorter-paths setup.py option, which would be used by the Windows CI, to circumvent creating paths that are too long, and thus avoiding build issues. Output the build characteristics / classifiers into the generated build_history/YYYY-MM-DD_AAAAAA/build_dir.txt file, so it can be used by the test runner to properly filter out blacklisted tests. This was necessary due to the shorter paths options. Fix various issues regarding target includes and library dependencies. Remove certain duplicated cmake code (like limited api check and build type checks) in PySide2, given that that information will now be present in the exported shiboken2 config file. Include a short README.cmake.md file that describes how to build the super project. References used https://rix0r.nl/blog/2015/08/13/cmake-guide/ https://pabloariasal.github.io/2018/02/19/its-time-to-do-cmake-right/ https://gist.github.com/mbinna/c61dbb39bca0e4fb7d1f73b0d66a4fd1 https://cliutils.gitlab.io/modern-cmake/chapters/basics/functions.html https://cmake.org/cmake/help/v3.0/manual/cmake-packages.7.html https://github.com/ComicSansMS/libstratcom/blob/master/CMakeLists.txt Abandoned approach using ExternalProject references: https://cmake.org/cmake/help/latest/module/ExternalProject.html https://stackoverflow.com/questions/44990964/how-to-perform-cmakefind-package-at-build-stage-only Fixes: PYSIDE-919 Change-Id: Iaa15d20b279a04c5e16ce2795d03f912bc44a389 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Update Qt version for CMakeCristian Maureira-Fredes2019-02-061-1/+1
| | | | | | | Probably a leftover from the old days. Change-Id: I3e165faa66632a4387733a0dbdb0ddaca601035f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add QtRemoteObjects classesFriedemann Kleint2019-01-301-1/+2
| | | | | | | | | | | For starters, add the classes so that ready-made classes like QAbstractItemModelReplica can be used. Actually implementing repc requires another step. Task-number: PYSIDE-862 Change-Id: I28adb1d45c262f298f0ad1926198ec6a3013542f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Make quiet builds really quietAlexandru Croitor2018-12-071-13/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The change does a couple of things: - Sets the distutils / setuptools --verbose option to 0 - Sets the distutils / setuptools --quiet option to 1 - The options above end up calling distutils.log.set_verbosity(0) - Passes the QUIET_BUILD cmake option from setup.py to every CMake invocation, when --quiet is passed to setup.py - Sets the CMAKE_INSTALL_MESSAGE variable to silence messages regarding installation of files - Sets the CMAKE_RULE_MESSAGES variable to disable progress report in makefiles when building each source file - Overrides the CMake message function, not to display STATUS / info / untyped messages (still displays warnings and errors) - Changes the build / install elapsed time messages to always be printed even in quiet mode - Reverts the previously introduced set_quiet function in utils, because log.set_verbosity() now takes care of silencing those messages As a result, there's a lot less clutter when doing a quiet build. Warnings, errors and shiboken output is still displayed. Change-Id: Ie05c593ce7dc0aa04554c2d2859ce655233ddb9f Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Allow building shiboken2 and PySide2 as separate wheelsAlexandru Croitor2018-10-121-59/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Allow building just QtCore bindingsAlexandru Croitor2018-06-221-0/+15
| | | | | | | | | | | | | | | | | | | This change introduces tracking of modules for which bindings will not be built. This allows us to add conditions on disabled modules, and thus disable certain tests. Thus we disable pysidetest test when its dependencies are not met. Due to this, we can now builtd bindings only for QtCore, allowing faster development iteration when touching only QtCore. Note that this only affects which module bindings will be created. Shiboken itself still requires QtCore, QtXml and QtXmlPatterns, as does pyside2-rcc. Change-Id: I75084a1741e7f4c3594e43af0fd9668a0e969c56 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add bindings for QtWebEngine (aka Quick)Alexandru Croitor2018-06-071-1/+1
| | | | | | | | | | | There is only one method we really need, QtWebEngine::initialize() which is used for all Qt Quick based WebEngine applications. Otherwise you get a warning upon startup of a Qt Quick WebEngine application, and this might lead to undefined behavior. Task-number: PYSIDE-688 Change-Id: I7de2bbb58c49cb2a41b0e13ffc9de6a3161f3960 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Don't pass -DFORCE_LIMITED_API=yes from setup.py unless asked forAlexandru Croitor2018-05-311-1/+1
| | | | | | | | | | | | | | | | | | | It was weird seeing "-DFORCE_LIMITED_API=yes" being passed from setup.py to CMake when "--limited-api" is not included on the command line, and then seeing "-DFORCE_LIMITED_API=yes" with Python 2 builds. It gives the impression that maybe it could work with Python 2. Instead, don't pass "FORCE_LIMITED_API=yes" from setup.py by default (but still pass it if it's present on the command line), and instead default to "yes" within the CMake project themselves. In the end nothing changes, limited API builds will still be default, but at least it's not as confusing to see the "-DFORCE_LIMITED_API=yes" lines for Python 2 builds in the CI log. Change-Id: I08c863394dd148d88bec324a6cab35459d75303a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix module names to contain correct limited api suffixAlexandru Croitor2018-05-311-47/+51
| | | | | | | | | | | This includes .abi3.so on Linux and macOS, and .pyd on Windows. Otherwise if you build with Python 3.6, and try to install the package on Python 3.5, none of the modules would be found on import. Change-Id: I56639da6319cfa06e23ae793d66099813074adf4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PEP 384-squash: Implement PEP 384Christian Tismer2018-05-301-0/+41
| | | | | | | | | | This is the condensed checkin of 18 commits which created the implementation of PEP 384. Task-number: PYSIDE-560 Change-Id: I834c659af4c2b55b268f8e8dc4cfa53f02502409 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add QtScxmlFriedemann Kleint2018-05-241-1/+1
| | | | | | | Task-number: PYSIDE-487 Change-Id: Ib8eb4a77f04ddbbe2c4b164b95f49e2f53bf44d9 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Be more verbose about which Qt CMake dirs were foundAlexandru Croitor2018-05-171-5/+6
| | | | | | | | | | | | Sometimes users might have stale cmake files installed into the same location due to building multiple Qt versions (e.g. 5.9.3 and 5.9.5), and find_package might bail out trying to use the older version. Make sure to print which cmake dir is used for each module, if the dir is available. Change-Id: I376ef95c682196c7f79d3c0e604d8225d1d2ff30 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add option --skip-modulesCristian Maureira-Fredes2018-05-151-0/+8
| | | | | | | | | | | | Allow the user to skip a set of modules when building the module. An example of using this option: --skip-modules=WebEngineCore,WebEngineWidgets,Multimedia Change-Id: I4b7a25acd60d068a886c1e716ddb7b226814b96f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Increase Python minimal accepted versionCristian Maureira-Fredes2018-05-111-2/+2
| | | | | | | | 2.6 -> 2.7 Task-number: PYSIDE-653 Change-Id: Id62717f12e17c50732c796d3d84686fd47597ab0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Disable WebKitCristian Maureira-Fredes2018-05-091-1/+4
| | | | | | | Removing WebKit support by default. Change-Id: I8cbf94891dc29f940926167414de7bdd35478732 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add QtPositioning and QtLocationFriedemann Kleint2018-04-241-1/+1
| | | | | | Task-number: PYSIDE-487 Change-Id: Ie44d8472beb3f1a5ab75caafd1f58b512b53ccb1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add QtSensorsFriedemann Kleint2018-04-201-1/+1
| | | | | | Task-number: PYSIDE-487 Change-Id: Id60f3f6e70b4fbb8e4316b994cdd557ff9be7b3b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add QtWebEngineCore moduleDavid Rosca2018-04-201-1/+1
| | | | | Change-Id: I8e1127e082abe5978a94aa8a080dfb1d8bbd5952 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Check for compatible Qt version when building PySide2Alexandru Croitor2018-03-061-1/+1
| | | | | | | | | Shiboken uses C++11 constructs like qAsConst, which necessitates the usage of a Qt version >= 5.7. Instead of showing weird compilation errors when building against Qt 5.6, print a nice error message. Change-Id: Iea4bd41dbe1d7d05e9b28bfa6654f68c6633cd74 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2018-03-051-27/+56
|\ | | | | | | Change-Id: I452d3a0a04e282b678879132ca1b3a272910ef04
| * Implement proper package versioningAlexandru Croitor2018-03-021-27/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change is inspired by / follows PEP 440 for handling version numbers and also takes into account the Qt versioning scheme. PySide2 as package name will stay as-is (not renamed to PySide5). Release versions would have the following pattern: PySide2 5.x.y (e.g. 5.6.3) Package (wheel) name would also contain the bundled Qt version, e.g.: PySide2-5.6.0-5.6.4-cp27-cp27m-macosx_10_7_intel.whl Pre-release versions would look like: PySide2 5.6.0a1, 5.6.0a2, 5.6.0b1, 5.6.0b2, 5.6.0rc1, etc. Development (snapshot) versions would look like: PySide2 5.6.0-dev123456789 (last part is timestamp of build time) All of the examples above comply with the PEP 440 rules. In the example above where the Qt version is specified as part of the wheel package name ("5.6.4"), the Qt version is not part of the package version itself, because it doesn't comply with PEP 440. But it does comply with wheel package names (PEP 427), and by that PEP's definitions, it will be the optional "build tag" part of the file name, which is preceded by the actual package version, and followed by the python version / abi tag. Implementation: This change defines two new python configuration files which will be the authoritative source for the shiboken and PySide2 libraries, as well as the final PySide2 package itself: sources/shiboken/shiboken_version.py sources/pyside2/pyside_version.py The pyside_version.py file will be the source of the final package version. The shiboken and PySide2 version should be modified in sync, when bumping the version of the package before a release. The reason for having both files instead of 1, is to make life easier for developers that might extract only shiboken from the repository. If at some point shiboken and PySide2 CMake projects get merged into one project, the duplicate version files would go away. The version files are parsed by CMake to correctly name the shared libraries (and SO versions), and they are also read by the setup.py script, to generate correct package metadata and a correct package (wheel) name. This change also removes the broken dist targets from PySide2's and shiboken's CMakelists files, which depended on some version suffix which was never set in setup.py. PEP440: https://www.python.org/dev/peps/pep-0440/ PEP427: https://www.python.org/dev/peps/pep-0427/ Change-Id: I3226460b1adf2555c8711fa2ba47c223b957cb44 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Add rudimentary support for address sanitizer buildsAlexandru Croitor2018-02-231-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds a new setup.py option called --sanitize-address which will build all executables and shared libraries with address sanitizer enabled. The builds will only succeed on Linux and macOS machines that have new enough gcc / clang versions, so it is a "use at your own risk" build configuration. This change was necessitated by the random crashes that are sometimes observed on the CI machines, and due to valgrind not working properly on new macOS versions, using AddressSanitizer is the next best thing. Note that when running tests with address sanitizer builds, you might need to export a LD_PRELOAD / DYLD_INSERT_LIBRARIES environment variable pointing to the address sanitizer runtime library path, which will be provided by the crashed application. Change-Id: I93014002e5c5e94bcc808ba2fb830d60724cfb69 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Revert "Temporarily disable building of Qt3D for Qt >= 5.10"Friedemann Kleint2018-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change qt3d/352dacc0040f77345ab2f6e9019ff68ba2ed354e has made it up to the dev branch and the qt5.git integration succeeded, so, Qt 3D can be re-enabled. This reverts commit 52ac602d7b25dc31e681dcddc0b6dc9452fa4f59. Task-number: PYSIDE-487 Change-Id: I4b95a7050f03786a08e4fb14c1bb332ca0281db4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2018-02-231-0/+6
|\| | | | | | | Change-Id: I5d1a4734e8f44785898ba62beaa0bdd2004fca22
| * Don't copy duplicate libraries on package installationAlexandru Croitor2018-02-221-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change makes sure to resolve symlinks and copy only one file for every dynamic shared library used (vs 3 before -> 2 symlinks + 1 actual library). This avoids duplicate files, as well as saves space when creating wheel (e.g. no 3 copies of standalone WebEngine library). This filtering happens copying from CMake install dir into pyside_package_dir (the symlinks are still present in the CMake dir, but that shouldn't harm anybody, and might be useful for users of shiboken only for example). Task-number: PYSIDE-495 Change-Id: I0fe454e16c6b254a8682aa7b1c702ec01a3064f0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Temporarily disable building of Qt3D for Qt >= 5.10Friedemann Kleint2018-02-131-1/+1
| | | | | | | | | | | | | | | | | | To be reverted once Qt3D/352dacc0040f77345ab2f6e9019ff68ba2ed354e reaches the dev branch. Task-number: PYSIDE-487 Change-Id: Ia17fb2ade605ba0d90c02511ffada58085178f45 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Fix CMake for local system installationsCristian Maureira-Fredes2018-02-011-3/+23
| | | | | | | | | | | | | | | | Amends 8d0ce19ca6cef467e67a49cb720fa5ed61aaca35 Task-number: PYSIDE-596 Change-Id: I4acd653d0772ddee85a06f41b5273018c3861651 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Add Qt3DFriedemann Kleint2018-01-311-0/+3
| | | | | | | | | | | | Task-number: PYSIDE-487 Change-Id: I17100eda57fbe5015b6c8ff531a3c62b22e8de95 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Fix cmake scope for locally installed modulesCristian Maureira-Fredes2018-01-151-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If modules are installed on the system but not in the local Qt installation, cmake will find them and try to build, but this will lead to errors. Comparing the QT_INCLUDE_DIR and the path where the package was found, we can filter the modules that were found on a different directory. Change-Id: I463172b7081c191fb303387f98a495dd675e0486 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Add QAxContainerFriedemann Kleint2017-11-141-0/+3
| | | | | | | | | | | | Task-number: PYSIDE-487 Change-Id: I5ba8e54f7e496e960fc6017b51eb4f22eb9f54b6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Allow building subset of Qt modulesFriedemann Kleint2017-11-141-44/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Collect the list of essential and optional modules in list variables and concatenate them to a list variable MODULES unless its value was passed in on the command line with -D. Remove the additional parameter indicating the module type to COLLECT_MODULE_IF_FOUND() and let it determine that by checking the essentials list instead. Add a command line option --module-subset to setup.py which can be used like "--module-subset=QtCore,QtGui,QtWidgets,QtTest" to specify the modules to be built. Change-Id: Ibb0fa16a8d9b0d7aeeaf8a8cfcbd50cb910ecc97 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2017-11-131-12/+2
|\| | | | | | | Change-Id: Ib0f638130d21a5619f239a9fb8beb7d92ad8d0e8
| * Build QtConcurrent and QtScripttools with MSVC, tooFriedemann Kleint2017-11-081-12/+2
| | | | | | | | | | Change-Id: I38e8c16c0602b5dbf71dbe3a872630104fabfdb0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | PySide2: Run shiboken2 with a single Qt module headerFriedemann Kleint2017-11-031-3/+0
| | | | | | | | | | | | | | | | | | | | Create a per-module header including pyside2_global.h and the module header only instead of passing a global header including all Qt modules. This reduces the amount of code shiboken2 has to parse and minimizes warnings. Change-Id: If3ab8fdf6cabe17b4add65f1e4a0f2e1464ab164 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Add Qt DataVisualizationFriedemann Kleint2017-09-251-0/+1
| | | | | | | | | | | | Task-number: PYSIDE-487 Change-Id: I7e4e8b617b95ec4008dc0fc4bea9974871425b2d Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2017-08-281-15/+14
|\| | | | | | | Change-Id: I073b05f8b39c0af32aa57ce3589c1aac2d712213
| * Fix QtUiTools not to depend on Qt5Designer being presentJanus Troelsen2017-08-241-2/+2
| | | | | | | | | | | | Task-number: PYSIDE-552 Change-Id: Iff8dd7247bfec94be0cf4f5cbcfbfca1eb44d209 Reviewed-by: Christian Tismer <tismer@stackless.com>
| * consistently name site-packages in Shiboken and PySideChristian Tismer2017-08-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | The variable used for the python site-packages is inconsistent. Instead of "SITE_PACKAGE", we use "PYTHON_SITE_PACKAGES" everywhere. Task-number: PYSIDE-563 Change-Id: I4d2d49f20f5a0a13439bc7b8c79ab318cd831cb9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Julien Schueller <schueller@phimeca.com> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * Streamline Qt5 detection on macOSAlexandru Croitor2017-08-241-12/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This consists of a few things: - Remove the detection and usage of ALTERNATIVE_QT_INCLUDE_DIR in setup.py, because CMake takes care of finding the correct Qt include headers. - Add detection of framework / non-framework includes in the CMake rules, instead of in the setup.py script. - Don't pass QT_QMAKE_EXECUTABLE from setup.py to CMake, because it is not being used. It was previously used for detecting Qt4 via the CMake FindQt4.cmake file. Now it is done by find_package() which detects qmake from the environment. - Get rid of the old "/Library/Frameworks" QT_INCLUDE_DIR, which was where the official Qt 4.8.x packages installed Qt. - Deprecate usage of ALTERNATIVE_QT_INCLUDE_DIR. Now it is only used if CMake fails to detect the proper include headers of Qt5 (which should not happen). Change-Id: I829b92bc0d40ae7eb418be27c735fc095e557820 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Fix the chain of issues regarding QSslConfigurationAlexandru Croitor2017-08-241-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The failure was seen on Windows CI build, but was actually present on all platforms if the QSsl checks were properly fixed, or if certain CMake versions randomly decided to force C++11 usage. The first issue was that QSsl wrappers were not generated on all platforms because the C++11 standard was not forced for the compilation tests done in the check_qt_class macro. This is a bug in CMake, and the official way of fixing this is introduced in the yet unreleased CMake 3.9 version. The current fix is a workaround to explicitly pass the C++11 standard switch to the try_compile invocation. The next issue concerns handling of const char[] C++ types. There are three such members in QSslConfiguration, which caused build failures due to incorrectly generated code. The solution is to treat "const char[]" types as "const char*" types, which generates correct conversion code. Tests were also added to check for such cases. Change-Id: I874a3591dfc5f385338de7e3aff2a2c0dd2f5719 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2017-08-221-0/+46
|\| | | | | | | Change-Id: Iddee2cf511ee0f0896a04a76e5b5b8bd44d1d6f1
| * Add commit info and build date to installed packageAlexandru Croitor2017-08-211-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds four new properties to the top-level PySide2 package: __build_date__ - the date when the package was built in iso8601 format __build_commit_date__ - the date of the top-level commit used to build the package __build_commit_hash__ - the SHA1 hash of the top-level commit __build_commit_hash_described__ - the result of 'git describe commmit' If git is not found on the system when the build is done, the last three properties will not be present. Note that all this info is computed at cmake configuration time, which means that currently the properties will not be updated unless the CMakeLists.txt file is touched, or a full reconfiguration is done. If PySide2 is built using the setup.py script, the cmake reconfiguration is always done. Task-number: PYSIDE-557 Change-Id: I7db67fa34973e7976b21e3d1d36237577b3c6e32 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Bump minimum required CMake version to 3.1Alexandru Croitor2017-07-271-2/+2
| | | | | | | | | | | | | | | | | | Shiboken uses C++11 features, and thus the CMAKE_CXX_STANDARD setting needs to be set in the CMakeLists.txt file. The setting was introduced in CMake version 3.1.0. Thus we bump the minimum required version. Change-Id: Ic93dc76440930a19945bbd95461fc5859f2df0d0 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2017-07-261-2/+13
|\| | | | | | | Change-Id: I678f69b4f9e66d9be5aebeb222d9cf5137e30998
| * Don't cancel build if python sphinx package is not installedAlexandru Croitor2017-07-251-2/+13
| | | | | | | | | | | | | | | | | | | | When building the docs target in PySide2, if the sphinx command is not successfully found, the build stops with an error. Instead of cancelling the build, just print a warning message just like it is done in the shiboken project file. Change-Id: I00ec7c306db5140f65973e622f4b1744cfd0d26e Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2017-07-141-76/+44
|\| | | | | | | Change-Id: I1dd2958b252b82e8699e8d2212afdce0086a16d2
| * Fix Windows module extensions and tests to work with --debug buildAlexandru Croitor2017-07-121-24/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the same imp.get_suffixes() mechanism as on Unix, to determine the suffix part of module extension files. This fixes debug builds to work on Windows. Note that the whole build stack has to use the same configuration, no mixing is allowed on Windows. For release build you need: python.exe + setup.py without --debug flag + release build of Qt5. For debug build you need: python_d.exe + setup.py with --debug flag + debug build of Qt5. Change-Id: I6188c859b5757d11e87d6a9e32b9ba558f7f609e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Improve suffix names for shared libraries and cmake config filesAlexandru Croitor2017-07-121-75/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change decouples the naming of general shared libraries, python module extensions, and cmake configuration files. All of them are now computed depending on the python version and python build configuration, and can also be manually set via CMake variables. The module extensions names now use the most detailed 'import' prefix, which usually informs whether a debug or release python was used, or the Python ABI flags (for Python >= 3.2). When a debug Python interpreter is used for building PySide2, the preprocessor define Py_Debug is now correctly propagated to PySide2 sources, which fixes previous crashes in debug builds. This affects only Linux and macOS builds. There is a subsequent change for making it work for Windows builds. All in all, this now allows proper mixing of debug / release versions of the Python interpreter with debug / release versions of PySide2 on Linux and macOS. Task-number: PYSIDE-508 Change-Id: I88a05c3ada0fb32c7c29bdb86d7a2c15acc963b8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>