aboutsummaryrefslogtreecommitdiffstats
path: root/build_scripts
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2020-04-16 17:23:55 +0200
committerChristian Tismer <tismer@stackless.com>2020-04-17 07:35:44 +0000
commitb0bfeaf894344e31b5175dbbd3ce371fae5dee5b (patch)
treea40744e2e5cabf5c86415c4a9e91baef01f9e86e /build_scripts
parent8df43d8c9d704a3abcc58b8ba84fc6fbfee2c433 (diff)
Support type checking with the mypy module
According to PEP 561, there needs to exist a py.typed file. Also, the import of typing must be visible statically for mypy without importing PySide2. Testing.. run mypy pyside_1100.py and you will get the correct output without "any". Change-Id: I1d08447161630a8c7a64eda32ff8a431e994c6a7 Fixes: PYSIDE-1100 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'build_scripts')
-rw-r--r--build_scripts/platforms/unix.py2
-rw-r--r--build_scripts/platforms/windows_desktop.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/build_scripts/platforms/unix.py b/build_scripts/platforms/unix.py
index fcbd010e2..b842510ff 100644
--- a/build_scripts/platforms/unix.py
+++ b/build_scripts/platforms/unix.py
@@ -188,7 +188,7 @@ def prepare_packages_posix(self, vars):
copydir(
"{build_dir}/pyside2/{st_package_name}",
"{st_build_dir}/{st_package_name}",
- filter=["*.pyi"],
+ filter=["*.pyi", "py.typed"],
vars=vars)
if not OPTION["NOEXAMPLES"]:
diff --git a/build_scripts/platforms/windows_desktop.py b/build_scripts/platforms/windows_desktop.py
index 88114fdaa..750a064b4 100644
--- a/build_scripts/platforms/windows_desktop.py
+++ b/build_scripts/platforms/windows_desktop.py
@@ -197,7 +197,7 @@ def prepare_packages_win32(self, vars):
copydir(
"{build_dir}/pyside2/{st_package_name}",
"{st_build_dir}/{st_package_name}",
- filter=["*.pyi"],
+ filter=["*.pyi", "py.typed"],
vars=vars)
copydir(