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