File tree 4 files changed +17
-5
lines changed
4 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -52,11 +52,18 @@ template("chip_python_wheel_action") {
52
52
_py_scripts = []
53
53
}
54
54
55
+ if (defined (invoker .py_typed_packages )) {
56
+ _py_typed_packages = py_typed_packages
57
+ } else {
58
+ _py_typed_packages = []
59
+ }
60
+
55
61
_py_manifest = {
56
62
files = _py_manifest_files_rebased
57
63
packages = py_packages
58
64
scripts = _py_scripts
59
65
package_reqs = py_package_reqs
66
+ typed_packages = _py_typed_packages
60
67
}
61
68
62
69
write_file (_py_manifest_file , _py_manifest , " json" )
Original file line number Diff line number Diff line change @@ -318,6 +318,7 @@ chip_python_wheel_action("chip-clusters") {
318
318
" chip/clusters/TestObjects.py" ,
319
319
" chip/clusters/Types.py" ,
320
320
" chip/clusters/enum.py" ,
321
+ " chip/clusters/py.typed" ,
321
322
" chip/tlv/__init__.py" ,
322
323
" chip/tlv/tlvlist.py" ,
323
324
]
@@ -328,6 +329,8 @@ chip_python_wheel_action("chip-clusters") {
328
329
},
329
330
]
330
331
332
+ py_typed_packages = [ " chip.clusters" ]
333
+
331
334
inputs = []
332
335
333
336
py_packages = [
Original file line number Diff line number Diff line change @@ -115,6 +115,12 @@ def has_ext_modules(foo):
115
115
# Build the chip package...
116
116
#
117
117
packages = manifest ['packages' ]
118
+ package_data = {}
119
+ for package in manifest ['typed_packages' ]:
120
+ package_data [package ] = ["py.typed" ]
121
+
122
+ if libName :
123
+ package_data [packages [0 ]]: [libName ]
118
124
119
125
print ("packageName: {}" .format (packageName ))
120
126
print ("libName: {}" .format (libName ))
@@ -140,11 +146,7 @@ def has_ext_modules(foo):
140
146
# By default, look in the tmp directory for packages/modules to be included.
141
147
'' : tmpDir ,
142
148
},
143
- package_data = {
144
- packages [0 ]: [
145
- libName
146
- ]
147
- } if libName else {},
149
+ package_data = package_data ,
148
150
scripts = [name for name in map (
149
151
lambda script : os .path .join (tmpDir , script .installName ),
150
152
installScripts
You can’t perform that action at this time.
0 commit comments