aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/PySide2/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* Fix Limited API and Signature Glitches in Python 3.7Christian Tismer2018-07-091-4/+0
| | | | | | | | | | | | | | | | | When the homebrew version of Python 3.7 appeared so unforeseen early, I felt inclined to fix these glitches, immediately: In Python 3.7, the typing module was more changed than expected. Since we don't support versions below 3.5, it was easy to fix by avoiding to copy typing.py for version 3.x, altogether. It stays there for Python 2.7 . Furthermore, the Python issue 33738 will later be solved than the code expected, so I fixed that one for all by a macro definition. Task-number: PYSIDE-741 Change-Id: Ia56ccd1ef20cb9536b1d39f190e011e5dccf1f22 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix building PySide2 with ninjaAlexandru Croitor2018-05-161-1/+5
| | | | | | | | | | | | | | | | When building PySide2 with the ninja generator, ninja prints an error: "ninja: error: build.ninja:18549: multiple rules generate ./sources/pyside2/pyside_version.py [-w dupbuild=err]" This seems like an interaction error between CMake and ninja, where file dependency paths are not canonicalized. In our case this happens due to usage of pyside_version.py's relative path. Fix is to use an absolute path. Task-number: PYSIDE-663 Change-Id: Iee2ae5ea483e59ee67e53e3a2059108bf8a34fbe Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix QtWebEngineProcess related issues on the supported platformsAlexandru Croitor2018-04-201-0/+19
| | | | | | | | | | | | | | | | | | There were 2 issues: 1) QtWebEngineProcess could not be found on Windows because we have a non-standard directory layout for the Qt files we copy over (there is no bin directory), so we need to adjust the internal qt.conf which is set in pyside.cpp 2) QtWebEngineProcess itself does not use the qt.conf from pyside.cpp, because it is a separate executable, and thus we need to supply a qt.conf specifically for it which is placed in the libexec folder. Task-number: PYSIDE-626 Task-number: PYSIDE-631 Task-number: PYSIDE-642 Change-Id: I75d1b083fb5afe5dc31ba90174f42c7f559c5cd5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2018-03-051-0/+5
|\ | | | | | | Change-Id: I452d3a0a04e282b678879132ca1b3a272910ef04
| * Implement proper package versioningAlexandru Croitor2018-03-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2018-02-231-8/+3
|\| | | | | | | Change-Id: I5d1a4734e8f44785898ba62beaa0bdd2004fca22
| * Remove _utils.py module from packageAlexandru Croitor2018-02-221-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt4 days, _utils.py was used to register a custom qt.conf file into the Qt Resource System, which contained a Prefix (and other locations like binaries / QML imports) so that QtCore can find the correct location of the QPA plugin, and all other requirements. The code was not adopted to work for Qt5, and was silently failing without doing anything. It is not needed anymore though, since the qt.conf registration is now done in C++ in libpyside shared library, since the commit e455d995be989cbdfef2bcd54fd7057a9b036b52 . Thus remove the _util.py file, and adjust __init__.py accordingly. Task-number: PYSIDE-600 Change-Id: I76e3ea442a6e9b9df4996e628ffffcc7384b7f82 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Don't copy duplicate libraries on package installationAlexandru Croitor2018-02-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.6' into 5.9Friedemann Kleint2017-11-271-1/+8
|\| | | | | | | Change-Id: I79637555fbfbd596dee4313baf80149d03bb5206
| * Make standalone option work on macOSAlexandru Croitor2017-11-151-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements standalone option on macOS, both for .dylib Qt build and framework build. Multiple rules are applied to figure out which files need to be copied into the final package. We also take care to embed a proper LC_RPATH for the PySide libraries, so that they point to the copied over Qt libraries. Change-Id: I442749e7c2318a66a22e3a1dd0ae703fb8943acf Task-number: PYSIDE-558 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
| * Update and complete the signature moduleChristian Tismer2017-11-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is now an external typing module for Python 2.7 and Python 3.6 from Guido (PSF license again) that makes the differences between both versions vanish. Also, when generating interface files, some types did not show correctly, and the constant "0" is wrong in almost all cases. Values in signatures looked often bad since they have no nice __repr__, and it was almost impossible to create correct .pyi files. Now, these instances are created as wrapped string types with a nice __repr__. A call of these objects creates the real constant. This way, also objects can be rendered which are dependent from the existence of other objects (i.E. QPixMap). This patch improves the usability of the signature module. We can now generate source code or .pyi files without modifications. Task-number: PYSIDE-510 Change-Id: I55490d76a29fc6c0e4f821c0c77d5e5d1e28976e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Add QAxContainerFriedemann Kleint2017-11-141-1/+5
| | | | | | | | | | | | Task-number: PYSIDE-487 Change-Id: I5ba8e54f7e496e960fc6017b51eb4f22eb9f54b6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Clean up pyside2_global.hFriedemann Kleint2017-11-111-1/+13
| | | | | | | | | | | | | | | | | | | | Make it possible to prepend or append something to the global module header by providing a .pre/.post.h file. This removes the need to have global includes and defines in pyside2_global.h and reduces module dependencies. Change-Id: I517c5765212813732b5694dcfcc86d2492e71a57 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | PySide2: Run shiboken2 with a single Qt module headerFriedemann Kleint2017-11-031-5/+10
|/ | | | | | | | | | 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>
* Implement introspection with __signature__ packageChristian Tismer2017-09-201-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The signature module was turned into a package under 'PySide2/support/signature'. The package is completely isolated so that nothing is leaking into the normal import machinery. The package is also not initialized unless a __signature__ attribute is accessed. The only change to Python during a PySide run is the existence of the __signature__ attribute. As a side effect, all tests run at the same speed as before this extension. The module does not actively import PySide modules. Instead, it inspects sys.modules and reloads its mapping.py if needed. Example usage: >>> PySide2.QtWidgets.QGraphicsAnchorLayout.addAnchors.__signature__ >>> PySide2.QtWidgets.QGraphicsAnchorLayout.__signature__ The module has been thoroughly tested on macOS. I consider this ready. Task-number: PYSIDE-510 Change-Id: Ibb231a7fbb4ccc1a7249df55e3881a4e21a19c0d Reviewed-by: Christian Tismer <tismer@stackless.com>
* consistently name site-packages in Shiboken and PySideChristian Tismer2017-08-241-2/+2
| | | | | | | | | | | | 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>
* move everying into sources/pyside2Oswald Buddenhagen2017-05-221-0/+33
in preparation for a subtree merge. this should not be necessary to do in a separate commit, but git is a tad stupid about following history correctly without it.