diff options
author | Christian Tismer <tismer@stackless.com> | 2018-11-25 15:55:45 +0100 |
---|---|---|
committer | Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> | 2018-12-03 20:31:58 +0000 |
commit | 14af709e10fa8a2e3c84094c13ebdda9833be124 (patch) | |
tree | f6be857ed5d6502e4073a395b21e22cce278da75 /build_scripts | |
parent | 5778103f5c86dc7f95bd79eabc24de4021eb2734 (diff) |
Generate Hinting Stubs Automatically
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>
Diffstat (limited to 'build_scripts')
-rw-r--r-- | build_scripts/platforms/unix.py | 8 | ||||
-rw-r--r-- | build_scripts/platforms/windows_desktop.py | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/build_scripts/platforms/unix.py b/build_scripts/platforms/unix.py index fc56992f4..d3767976f 100644 --- a/build_scripts/platforms/unix.py +++ b/build_scripts/platforms/unix.py @@ -184,6 +184,14 @@ def prepare_packages_posix(self, vars): "{st_build_dir}/{st_package_name}/support", vars=vars) + # <source>/pyside2/{st_package_name}/*.pyi -> + # <setup>/{st_package_name}/*.pyi + copydir( + "{build_dir}/pyside2/{st_package_name}", + "{st_build_dir}/{st_package_name}", + filter=["*.pyi"], + vars=vars) + if not OPTION_NOEXAMPLES: # examples/* -> <setup>/{st_package_name}/examples copydir(os.path.join(self.script_dir, "examples"), diff --git a/build_scripts/platforms/windows_desktop.py b/build_scripts/platforms/windows_desktop.py index c61bbbc99..c98ef3959 100644 --- a/build_scripts/platforms/windows_desktop.py +++ b/build_scripts/platforms/windows_desktop.py @@ -207,6 +207,14 @@ def prepare_packages_win32(self, vars): "{st_build_dir}/{st_package_name}/support", vars=vars) + # <source>/pyside2/{st_package_name}/*.pyi -> + # <setup>/{st_package_name}/*.pyi + copydir( + "{build_dir}/pyside2/{st_package_name}", + "{st_build_dir}/{st_package_name}", + filter=["*.pyi"], + vars=vars) + copydir( "{build_dir}/pyside2/libpyside", "{st_build_dir}/{st_package_name}", |