cx_Freeze has the bug that it copies the "files.dir" folder
of shiboken, but does not insert the Python files.
As a quick fix, instead of testing only for existence of this
directory, we now check for existence of the loader.py file.
It can be assumed that all other Python files will be there
as well.
We could go even further and test-load all files. But then
it becomes questionable if we should better always embed.
Change-Id: Ib9553941c6a658fb20cb85d22f78431f99d88734
Reviewed-by: Cristian Maureira-Fredes <email address hidden>
(cherry picked from commit b84b5a2f35bea95545c19ee313be5ec5db19eca6)
Reviewed-by: Alexandru Croitor <email address hidden>
5d9dde3...
by
Akseli Salovaara <email address hidden>
Cleanup version strings for 5.12.2 release
Change-Id: I49371460037587b6dd8ccd0309ee23916f6f0de6
Reviewed-by: Simo Fält <email address hidden>
Implement Embedding To Make Signatures Always Available
Situation..
PySide works fine with normal applications. But when installers
are used to pack the application together, then the signature
extension cannot be loaded.
This is a problem that exists since the signature extension was
written. But starting with PySide 5.12.1, the signature extension
is very visible, because it is used to support the __doc__ attribute.
There have beed successful attempts to solve the problem for
PyInstaller and Py2App. But there are more packers available,
and they all need a change both in PySide and in the packer.
Solution..
To solve this problem once and for all, we embed the Python
support files in the binary shiboken package. When the Python
files are not normally accessible, they are unpacked from a ZIP
file.
Details..
- The embedded files shall only be used when the normal files
are not available,
- The signature extension should no longer be lazily loaded.
When the application starts, all files should be present.
- We drop support for shiboken2.support.signature and
use a single, independen folder 'shibokensupport' (proposal).
This avoids problems with multiple existence of the shiboken2
folder. PySide2.support.signature remains the official interface,
but it's only an alias when PySide2 exists.
- The embedding is used when the normal files cannot be
loaded for some reason. It can be enforced by a sys variable
"pyside_uses_embedding".
After the project split, shiboken exposed its own modules, and the
overall structure with shiboken2.support.signature and
PySide2.support.signature was already quite complicated.
When introducing embedding, it is necessary to have some support
folder that gets unpacked from a zipfile. That means, the shiboken2
root directory would be in the zip file in the embedding case.
This does not only increase the complexity, it further means
that we must make shiboken2.so available in the shiboken2
containing zipfile!
In order to avoid that, we stop the dependency from the two
support directories and use shibokensupport, instead. The
simplification of the loader and other modules is also significant.
testrunner: Fix error message about forgotten --build-tests
Fix variable name changed by f30e4db5169800c25bf79573f650fc2b08d13046,
fixing error:
NameError global name 'make_path' is not defined
Change-Id: Ieee3ba884e122cbc6e2cec267653481552a041d9
Reviewed-by: Christian Tismer <email address hidden>
45e3c96...
by
Cristian Maureira-Fredes <email address hidden>
Add toBytes() and BufferProtocol
VoidPtr:
Add toBytes() method that return a char* representation
of the void* pointer.
QByteArray:
The current implementation only provided the Buffer Protocol
for Python2, this patch includes the getbuffer implementation
for Python3.
Having a BufferProtocol implementation for Python3 allows the
initialization of VoidPtr to get access to the internal content,
so one can go back and forward with the representation of it: