| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
When referring to the project one should use "Qt for Python"
and for the module "PySide2"
Change-Id: I36497df245c9f6dd60d6e160e2fc805e48cefcae
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|\
| |
| |
| | |
Change-Id: I452d3a0a04e282b678879132ca1b3a272910ef04
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\|
| |
| |
| | |
Change-Id: I5d1a4734e8f44785898ba62beaa0bdd2004fca22
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\|
| |
| |
| | |
Change-Id: I79637555fbfbd596dee4313baf80149d03bb5206
|
| |
| |
| |
| |
| | |
Change-Id: Idcbf62b58f097370f61a27d0f16bce630e817526
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
With the signature module, it is now a straight forward task
to generate a registry of all known function signatures.
We check that these signatures all exist.
One file contains all signatures for one platform and version.
The test is only activated when run in the CI system.
An initial call creates the expected file as output and raises
an error. The result can then be picked up from the error log
and added to the repository.
Done: linux2 5.6.4
Done: darwin 5.6.4
Done: win32 5.6.4
Task-number: PYSIDE-510
Change-Id: I4f406cf72d25fdd2336814f6f20129079b8be54f
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Modify the typesystem.xml files such that all dependent files
are loaded via module (for example, QtCore/typesystem_core.xml).
As a result, it is no longer necessary to add each dependent directory
to the typesystem path; it is sufficient to pass the binary and source
path of PySide2 and the source directory of the Qt module only.
This requires rewriting the dependency checking for --reuse-build
so that it loops over the source directories of the dependent
Qt modules.
Change-Id: Ib234c2673f4ee93cc8a3282fac69bcfcfaebd0ac
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I94cb5a7dab97cff3591bac534228bfd3e3ad5938
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For short the new features:
- there is a qApp in QtCore, QtGui and QtWidgets for compatibility,
and also in __builtins__ for a true macro-like experience.
- if you delete any qApp variable, the Q*Application is reset and you can
start over.
Long description:
There is a qApp macro in Qt5 which is equivalent to Q*Application.instance() .
Python does not have macros. Both PyQt5 and PySide2 have an
according structure in QtWidgets. In the case of PySide2, the qApp
variable is first initialized to None and later to QApplication().
This does not reflect the original sense of the qApp macro, because
- it only handles QApplication,
- it does not handle destruction.
This "macro" should live in QtCore, but both PyQt5 and PySide2 decided
to put this in QtWidgets. As a compromize, I propose to put qApp into
all three modules, and into __builtins__ as well, so wherever you
create an application, you find this "macro" in place.
While changing the code, I stumbled over the template
set_qapp_parent_for_orphan. I tried to make sense out of it and finally
removed it. There were no side effects but bug PYSIDE-85 is gone, now.
With some extra effort, I created a singleton qApp that changes itself.
This way, a true macro was simulated. Note that this was not possible
with a garbage collected variable, and I had to make shiboken aware of this.
As the final optimization, I turned qApp also into a fuse variable:
Delete any qApp variable and Q*Application will finish when there is
no extra reference.
Task-number: PYSIDE-85
Task-number: PYSIDE-571
Change-Id: I7a56b19858f63349c98b95778759a6a6de856938
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|\|
| |
| |
| | |
Change-Id: I47521e21977b1f17fcc65590f565270b2440a48b
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It is likely that with Qt 5.9 we get new signature text that is not recognized.
This becomes a problem because COIN takes much time.
This patch does not stop on the first parser error, but collects
all warnings and raises an error at the end.
Task-number: PYSIDE-510
Change-Id: I898e0a7a59e8313c115d7ce8160908bf85d4140c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\|
| |
| |
| | |
Change-Id: I1dd2958b252b82e8699e8d2212afdce0086a16d2
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\|
| |
| |
| | |
Change-Id: I9d55ec493763dc9536d7926d428aecf75c10a72d
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Some time ago, I added the test file that makes sure that all modules can
load. This file needed to repeat for each module without any other tests.
Now we have a real "PySide2.__all__" variable, and we can remove these
tests in favor of one simple test.
Change-Id: I96d91e749c134f30afc30751abb874ede2639d10
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|\|
| |
| |
| | |
Change-Id: Ieeaa4659753416315a619d0b683a3e5a4c8ed54e
|
| |
| |
| |
| |
| |
| | |
Change-Id: I91a1c87e6153a65a6e4088a41fbe0f696c2dd058
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Even though the final library name is libpyside, the actual target
that generates that file is called pyside2, as indicated by the
project(pyside2) command in the CMakeLists.txt file.
Also set the CMake policy of not ignoring incorrect dependencies.
Change-Id: Iba65dfd5fe7e34e7557c756a838017fe48f0ffd5
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|\|
| |
| |
| | |
Change-Id: Ia6485d1b1caa93c4ecdd02b0544f19d197a43fb0
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The test was failing since the method
TestView::setItemDelegate(QAbstractItemDelegate *) was rejected
due to QAbstractItemDelegate being unknown.
Fix by adding the dependency to QtWidgets.
Task-number: PYSIDE-431
Change-Id: I65c3690eccfdd55b310f45d65a2b0d8c32bedd36
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When mixing Python and C++, Qt needs to be used with 'CONFIG += no_keywords'
to suppress the 'slots' macro definition, which clashes with a Python header.
Task-number: PYSIDE-526
Change-Id: I4feeae2de21db712b4de6653e243d556623436a1
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| | |
Change-Id: I781418f8747d51a0d329c0562e076600989b3768
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
| |
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.
|
|
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.
|