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

Last commit made on 2018-06-05
Get this branch:
git clone -b 5.6 https://git.launchpad.net/~thopiekar/pyside/+git/pyside-setup

Branch merges

Branch information

Recent commits

f1a63ad... by stackless

Signature: Remove post 5.6 parts, fix coding style

Complements 30a1c9c41e5e6d4166f171b9477c6f46cafa782f.

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

f73dd54... by Julien Schueller

Move QStringListModel to QtCore

Seems this was in QtGui at the time of Qt 4, but now it's in QtCore:
http://doc.qt.io/archives/qt-4.8/qstringlistmodel.html
http://doc.qt.io/qt-5/qstringlistmodel-members.html

Task-number: PYSIDE-614
Change-Id: I918cbffd64fb8da9e81123073ff57cd2126e5cae
Reviewed-by: Friedemann Kleint <email address hidden>
(cherry picked from commit 4036ab8c066fd3a6dbce9eb92f4e50f40b8679e4)

cee769a... by =?utf-8?q?Simo_F=C3=A4lt?= <email address hidden>

Move setup call from CI to wrapper script

It can be pretty long lasting process to get updates to Qt CI. To
speed up pyside specific changes we move some of the logic to
pyside repository.

Change-Id: I7d60bf96324d5990fb408d69c00aa4d7e8e81a2f
Reviewed-by: Alexandru Croitor <email address hidden>
(cherry picked from commit e7cf4e32902a4df5f31e96878ef7b2404a8e69f6)
Reviewed-by: Qt CI Bot <email address hidden>
Reviewed-by: Cristian Maureira-Fredes <email address hidden>
Reviewed-by: Friedemann Kleint <email address hidden>

333757c... by Cristian Maureira-Fredes <email address hidden>

Fix qApp macro refcount

There are two borrowed references in the code,
so we need to manually increase the refcount.

Usually the PyEval_GetBuiltins and PyModule_GetDict
functions are used locally, so there is no real need
of taking care of the refcounts, but since we are using
it globally, and adjusting the refcount by ourselves,
it was necessary to add the missing references by hand.

Task-number: PYSIDE-585
Change-Id: Icc1e7719a6b5d3654d12ab37cd509a096821d7a6
Reviewed-by: Christian Tismer <email address hidden>
(cherry picked from commit b811c874dedd14fd8b072bc73761d39255216073)
Reviewed-by: Friedemann Kleint <email address hidden>

f9cae49... by Alexandru Croitor <email address hidden>

Fix error when invoking python setup.py without being in the same dir

Task-number: PYSIDE-630
Change-Id: I1c707061b29d54bffc132909caaaa2e1b93b4d12
Reviewed-by: Friedemann Kleint <email address hidden>
Reviewed-by: Cristian Maureira-Fredes <email address hidden>
(cherry picked from commit 206b75e242143547bce3510dc0ffd54b4769445b)

2ae5f1d... by Alexandru Croitor <email address hidden>

Fix path to script_dir

Make sure to cd into setup.py folder.

Change-Id: Ic777b78028c3f2ecfa739a1c72df031b753083a1
Reviewed-by: Friedemann Kleint <email address hidden>
(cherry picked from commit 7113511b42b45a7a00b287f3a45e1d897a1c6e45)

f23adec... by Cristian Maureira-Fredes <email address hidden>

Fix ownership transference in QDropEvent.source

Changing the owner from Python (target) to default.

Task-number: PYSIDE-258
Change-Id: Ib0ec567648c973ed4c427cbd86ed01a8eae19364
Reviewed-by: Friedemann Kleint <email address hidden>
(cherry picked from commit b0b3e47f79532039f6a3824622687759459bef8b)

b57c557... by Alexandru Croitor <email address hidden>

Implement proper package versioning

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 <email address hidden>
Reviewed-by: Friedemann Kleint <email address hidden>

648ea14... by Friedemann Kleint

setup.py: Clean up version handling and options

OPTION_VERSION and OPTION_LISTVERSIONS are deprecated and not used
anymore. Because the shiboken and pyside2 submodules were merged into
the pyside-setup supermodule, it is not correct to advertise available
versions based on remote branches.

If a user provides --version 5.9 to a 5.6 based setup.py, the build
would fail because setup.py wouldn't handle clang specific options.

And if a user provides a --version 5.6.5 to a 5.6 based setup.py,
we can't re-checkout the current active repo to re-run an updated
setup.py.

Thus the version selection mechanism is no longer relevant, and it will
be strictly tied to branch / tag.

In this respect, some of the version handling code is removed (because
it wouldn't work) and cleaned up.

Task-number: PYSIDE-431
Change-Id: I8357d743b5e3a638cea583a763bffc7766688030
Reviewed-by: Friedemann Kleint <email address hidden>
Reviewed-by: Qt CI Bot <email address hidden>

197d56d... by Alexandru Croitor <email address hidden>

Improve packaging on Windows

A lot of the packaging rules on Windows were outdated (Qt4 times).

This change does a couple of things to improve the process:
- Removes attempts of copying files matching Qt4 naming patterns
- Fixes filters to copy Qt dlls / pdbs for a single build
  configuration (only debug dlls, or only release dlls depending on
  which configuration was used when building PySide2). As a result
  this reduces the total size of the package.
- Removes some comments that are outdated.
- Simplifies pdb copying logic.
- Adds a bit of whitespace between copying rules, for easier
  navigation.

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