| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Rather than using add_custom_command(TARGET foo POST_BUILD) for
pyi file generation, use add_custom_target() with add_dependencies()
instead. Semantically it should have the same meaning, but I'm hoping
this will eliminate the weird race condition build issues
that occur with manifest embedding on Windows.
Change-Id: I854b8f80fd39363723ab2661b2423461396efc11
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a CMake super project that includes the shiboken2, PySide2 and
pyside2-tools subprojects, so that it's possible to build everything
from Qt Creator (or any other IDE that supports CMake)
with minimal set up effort, and thus inform the IDE CMake integration
of all relevant files, for easier code editing, navigation and
refactoring.
This also lays the foundation for allowing 3rd parties to use the
shiboken2 generator to generate custom modules. This is
achieved by eliminating various hardcoded paths for libraries and
include directories.
Start using CMake targets throughout the build code to correctly
propagate link flags and include dirs for libshiboken and
shiboken2 executable targets. Same for the libpyside target.
Generate two separate cmake config files (build-tree / install-tree)
that can be used with find_package(Shiboken2), to make sure that
the PySide2 project can be built as part of the super project build.
This is currently the only way I've found to allow the super build
to work.
Note that for the build-tree find_package() to work, the
CMAKE_MODULE_PATH has to be adjusted in the super project file.
The generated config files contain variables and logic that allow
usage of the installed shiboken package in downstream projects
(PySide2). This involves things like getting the includes and
libraries for the currently found python interpreter, the shiboken
build type (release or debug), was shiboken built with limited
api support, etc.
Generate 2 separate (build-tree and install-tree) config files
for PySide2, similar to how it's done for the shiboken case, for
pyside2-tools to build correctly.
Install shiboken2 target files using install(EXPORT)
to allow building PySide2 with an installed Shiboken2 package
(as opposed to one that is built as part of the super project).
Same with PySide2 targets for pyside2-tools subproject.
Make sure not to redefine uninstall targets if they are already
defined.
Add a --shorter-paths setup.py option, which would be used by
the Windows CI, to circumvent creating paths that are too long,
and thus avoiding build issues.
Output the build characteristics / classifiers into the generated
build_history/YYYY-MM-DD_AAAAAA/build_dir.txt file, so it can be
used by the test runner to properly filter out blacklisted
tests. This was necessary due to the shorter paths options.
Fix various issues regarding target includes and library
dependencies.
Remove certain duplicated cmake code (like limited api check and build
type checks) in PySide2, given that that information will now be
present in the exported shiboken2 config file.
Include a short README.cmake.md file that describes how to build
the super project.
References used
https://rix0r.nl/blog/2015/08/13/cmake-guide/
https://pabloariasal.github.io/2018/02/19/its-time-to-do-cmake-right/
https://gist.github.com/mbinna/c61dbb39bca0e4fb7d1f73b0d66a4fd1
https://cliutils.gitlab.io/modern-cmake/chapters/basics/functions.html
https://cmake.org/cmake/help/v3.0/manual/cmake-packages.7.html
https://github.com/ComicSansMS/libstratcom/blob/master/CMakeLists.txt
Abandoned approach using ExternalProject references:
https://cmake.org/cmake/help/latest/module/ExternalProject.html
https://stackoverflow.com/questions/44990964/how-to-perform-cmakefind-package-at-build-stage-only
Fixes: PYSIDE-919
Change-Id: Iaa15d20b279a04c5e16ce2795d03f912bc44a389
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
| |
Initial-patch-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Change-Id: Ia1f86a8c8926dda2072a10757928497067580dca
Fixes: PYSIDE-882
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
| |
Task-number: PYSIDE-735
Change-Id: I864270454bf4f7eee1a28b55ed06ffbf1c60d74d
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rewrite the function to use keyword arguments instead of ordered
arguments. Also add error detection when required arguments are not
passed, or have a typo in them.
Adjust all the module cmake files to use keyword arguments.
Change-Id: I7bb0c6561d7dca1e7f673e29eb457da50ae5df04
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The script is now automatically called in the cmake build,
as part of the create_pyside_module macro.
The script runs after every module build and tries to
generate .pyi files. This does not need to succeed, but
will generate all files in the end. The script has been prepared
to allow partial runs without overhead.
After integration of the .pyi generation into cmake, these files
are also installed into the install directory by cmake.
For wheel building, setup.py has entries, too.
Building a full project with all modules revealed a bug in the
signature module that allowed unsupported function objects.
Module enum_sig had to be changed to suppress types
which have no ancestry in shiboken.
PYTHONPATH was avoided because it was not Windows
compatible. Instead, the script was changed to accept
"--sys-path" and "--lib-path" parameters. The latter evaluates
either to PATH or LD_LIBRARY_PATH.
The necessity to create .pyi files while the project is in the
build process showed a hard to track down error condition
in PySide_BuildSignatureProps.
Simple logging was added as a start of introducing logging
everywhere.
Task-number: PYSIDE-735
Change-Id: I6b3eec4b823d026583e902023badedeb06fe0961
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
| |
Some code was left over since the rewrite done in
a80a6eb94433529a6d984e8ff22874f7dff48eea
Change-Id: Ie862cea690dc54ad35d711b5fecfb58d51b03b88
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The module-specific glue files as well as the standalone glue files
are now installed into the PySide2 package.
The glue files are now also listed as dependencies for the shiboken
generator run, which means that modifying those files will now
correctly force a shiboken re-run for the relevant modules.
Change-Id: I545c7ada379fafb7f225d0b0f5ce495bf6d4795d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously whenever a typesystem XML file changed, this resulted in a
full rebuild of all cpp files generated for that particular module.
This change shifts the rules of building in such a way, that files
are rebuilt only if their content has changed.
XML modifications should generally not cause full
rebuilds anymore, unless the change is in a global header.
This is achieved in the following way, assuming a binding library
"foo" added by add_library(foo ...):
1) CMake calls shiboken via add_custom_command.
2) The OUTPUT file for the command is the generated
mjb_rejected_classes.log file, which serves as a timestamp
for when shiboken was last run.
3) All the generated cpp files are marked as "Generated" via the
add_custom_command BYPRODUCTS option. This allows the files
to have an older timestamp than that of an XML file, thus not
forcing constant shiboken re-execution.
4) A new custom target foo_generator is added via add_custom_target.
5) This target has a dependency on the mjb_rejected_classes.log file,
and the target itself is added as a dependency to the "foo" target.
6) Whenever "foo" is built, it will first try to build "foo_generator"
which will force the shiboken custom command to be run, which will
generate the cpp files and mjb_rejected_classes.txt file.
The BYPRODUCT cpp files can then be used as sources in the
"foo" target.
7) If a user modifies the XML file listed in the add_custom_command
DEPENDS option, this will re-trigger shiboken execution, which
will create a new mjb_rejected_classes.log file, which means that
the "foo" target might be rebuilt if, and only if, any of the cpp
file timestamps are new. Otherwise "foo" doesn't need to be
rebuilt.
Change-Id: I9a3844a2fa775106288acc01cb4570a903e16991
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Query the feature properties of the configure system to check whether
a class is present instead of running a compile test in QtGui and
QtNetwork.
Remove the macro invocation from QtWigets since the results
(QtWidgets_OPTIONAL_SRC, QtWidgets_DROPPED_ENTRIES) were not used.
Change-Id: I06e03fe1eef85f2340ab4cdb130b8b31b08f7f14
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|\
| |
| |
| | |
Change-Id: I777970f7bb17db766660d82556559eadd7293355
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The compile tests that checked for QSsl classes silently failed
because of two different reasons:
1) If Qt was compiled with -fPIC, but the tests weren't, we hit
a compilation error. Solution is to compile with -fPIC if necessary.
2) For some reason when linking, the linker can't find the qt
version tag symbol. Solution is to simply not use the version tag.
Task-number: PYSIDE-599
Change-Id: If8a6ea38b45091bcaced6179a71195d25589ef18
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
System framework paths queried from the system clang compiler should
be re-added to libclang via the -iframework command line argument
instead of -F, so that they appear at the bottom of the list
of candidate include search paths. This prevents issues with picking
up incorrect headers, like an installed official package of Qt 4.8.
Also there is no need to use CMAKE_SYSTEM_FRAMEWORK_PATH like in the
5.6 branch because it duplicates the list of includes and also
causes conflicts with the same paths being added as both system
and non-system include paths.
It was necessary in 5.6 branch because the list of include paths was
not queried from the clang compiler.
Change-Id: I04b299fc5bc759842a0ab890a85170f153932e79
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
install is better suited for distro installation
due to permission issues.
Amends 5d5eed53e49f4aaea85ce1638dd6fa3774a960e0.
Task-number: PYSIDE-589
Change-Id: I6539b7c9957fd542a39b68e2d63a66f544414cd7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The typesystem files end up in a flat directory after installing,
so, the include by module name introduced by f2063ee4737f90c5d412a9a328672fde32b033eb
no longer works. Remove the module in the install step.
Task-number: PYSIDE-584
Change-Id: I6d0acdc26ee865c7e452bb702b7383579eef060d
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Create a per-module header including pyside2_global.h and the module
header only instead of passing a global header including
all Qt modules. This reduces the amount of code shiboken2
has to parse and minimizes warnings.
Change-Id: If3ab8fdf6cabe17b4add65f1e4a0f2e1464ab164
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
As of 5.10, windows.h is included by qrandom.h in QtCore.
Task-number: PYSIDE-431
Change-Id: I69cc5e3275fba09f1a4990a4e5d37253b4664a95
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|\|
| |
| |
| | |
Change-Id: I073b05f8b39c0af32aa57ce3589c1aac2d712213
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The variable used for the python site-packages is inconsistent.
Instead of "SITE_PACKAGE", we use "PYTHON_SITE_PACKAGES"
everywhere.
Task-number: PYSIDE-563
Change-Id: I4d2d49f20f5a0a13439bc7b8c79ab318cd831cb9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Julien Schueller <schueller@phimeca.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The failure was seen on Windows CI build, but was actually present on
all platforms if the QSsl checks were properly fixed, or if certain
CMake versions randomly decided to force C++11 usage.
The first issue was that QSsl wrappers were not generated on all
platforms because the C++11 standard was not forced for the
compilation tests done in the check_qt_class macro. This is a bug in
CMake, and the official way of fixing this is introduced in the yet
unreleased CMake 3.9 version.
The current fix is a workaround to explicitly pass the C++11 standard
switch to the try_compile invocation.
The next issue concerns handling of const char[] C++ types. There are
three such members in QSslConfiguration, which caused build failures
due to incorrectly generated code.
The solution is to treat "const char[]" types as "const char*" types,
which generates correct conversion code.
Tests were also added to check for such cases.
Change-Id: I874a3591dfc5f385338de7e3aff2a2c0dd2f5719
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|\|
| |
| |
| | |
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>
|
|\|
| |
| |
| | |
Change-Id: Ieeaa4659753416315a619d0b683a3e5a4c8ed54e
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Also include the optional QtNetwork sources, so that QSsl* class
bindings are properly generated.
Thus the optional QtWidgets and QtNetwork classes should be picked up.
Change-Id: Id4d21dc577f2b551dce83999be76cdfd9d0b88d2
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.
|