~thopiekar/pyside/+git/pyside-setup:5.12.2

Last commit made on 2019-03-21
Get this branch:
git clone -b 5.12.2 https://git.launchpad.net/~thopiekar/pyside/+git/pyside-setup

Branch merges

Branch information

Name:
5.12.2
Repository:
lp:~thopiekar/pyside/+git/pyside-setup

Recent commits

e91acf6... by stackless

Amend the Embedding Patch for cx_Freeze

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>

8f2db5a... by stackless

Add line to changelog concerning embedding

Change-Id: I383d69adbe095de3f448a1245f788f665885eea5
Reviewed-by: Christian Tismer <email address hidden>

723aea3... by stackless

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".

- Testcase is included.

- Tested with PyInstaller on macOS

Fixes: PYSIDE-932
Fixes: PYSIDE-942
Change-Id: Iaa62dc0623503a2e0943eedd10d2b2484c65cc2d
Reviewed-by: Qt CI Bot <email address hidden>
Reviewed-by: Friedemann Kleint <email address hidden>

e8786b9... by stackless

Simplify Python Imports For 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.

Task-number: PYSIDE-510
Change-Id: Ic735a8d36f10f03698378f2ac9685a5955e40b0c
Reviewed-by: Friedemann Kleint <email address hidden>

c32daca... by Venugopal Shivashankar <email address hidden>

Doc: Add qml application tutorial

- Add the necessary source files based
  on the video tutorial in QtStudios

Change-Id: Icdb16db8ff41c449e7657b9e2142d61ceddc1478
Reviewed-by: Friedemann Kleint <email address hidden>

1c2d6c5... by Cristian Maureira-Fredes <email address hidden>

Update dist/changes-5.12.2

Change-Id: I02a4555ce2146202c1d60d29e718e0bd94df98f3
Reviewed-by: Friedemann Kleint <email address hidden>

2c6e50f... by Cristian Maureira-Fredes <email address hidden>

Fix animation/alignment of the chartthemes examples

The AnimationOption and Align comboboxes
were not properly working because an int was used
instead of the flag.

Change-Id: I3472b94f6ee05169c31869078961f4d5e8e7397a
Reviewed-by: Friedemann Kleint <email address hidden>

4301c5c... by Friedemann Kleint

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:

    ba = QByteArray(b"Hello World")
    vp = VoidPtr(ba, ba.size())
    vp.toBytes() # b"Hello World"

The BufferProtocol was also changed for Python2 including the new
buffer protocol (Py_TPFLAGS_HAVE_NEWBUFFER) function `bf_getbuffer`.

A test case was included.

Fixes: PYSIDE-934
Change-Id: I8936966da91b2dcc879c582cfc35e6a35f7a60b6
Reviewed-by: Qt CI Bot <email address hidden>
Reviewed-by: Alexandru Croitor <email address hidden>