File tree Expand file tree Collapse file tree 3 files changed +16
-3
lines changed
Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -163,7 +163,11 @@ jobs:
163163 - uses : actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
164164 with :
165165 name : cibw-wheels-${{ matrix.python }}-${{ matrix.manylinux }}
166- path : ./wheelhouse/*.whl
166+ path : |
167+ ./wheelhouse/*.whl
168+ ./wheelhouse/OpenImageIO/__init__.pyi
169+ # if stub validation fails we want to upload the stubs for users to review
170+ if : success() || failure()
167171
168172 # ---------------------------------------------------------------------------
169173 # Linux ARM Wheels
@@ -225,7 +229,11 @@ jobs:
225229 - uses : actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
226230 with :
227231 name : cibw-wheels-${{ matrix.python }}-${{ matrix.manylinux }}
228- path : ./wheelhouse/*.whl
232+ path : |
233+ ./wheelhouse/*.whl
234+ ./wheelhouse/OpenImageIO/__init__.pyi
235+ # if stub validation fails we want to upload the stubs for users to review
236+ if : success() || failure()
229237
230238 # ---------------------------------------------------------------------------
231239 # macOS Wheels
Original file line number Diff line number Diff line change @@ -398,7 +398,7 @@ for more information on customizing and overriding build-tool options and CMake
398398This repo contains python type stubs which are generated from ` pybind11 ` signatures.
399399The workflow for releasing new stubs is as follows:
400400
401- - Install [ ` uv ` ] ( https://docs.astral.sh/uv/getting-started/installation/ )
401+ - Install [ ` uv ` ] ( https://docs.astral.sh/uv/getting-started/installation/ ) and ` docker `
402402- Run ` make pystubs ` locally to generate updated stubs in ` src/python/stubs/__init__.pyi `
403403- Run ` make test-pystubs ` locally to use mypy to test the stubs against the code in
404404 the python testsuite.
@@ -411,6 +411,10 @@ The workflow for releasing new stubs is as follows:
411411 the stubs, so that changes can be reviewed and the rules in ` generate_stubs.py `
412412 can be updated, if necessary.
413413
414+ Note that if you can't (or don't want to) build the stubs locally, you can
415+ download an artifact containing the wheel and ` __init__.pyi ` file from any job
416+ that fails the stub validation.
417+
414418Test Images
415419-----------
416420
Original file line number Diff line number Diff line change @@ -208,6 +208,7 @@ def main() -> None:
208208 print ("Changes to the source code have resulted in a change to the stubs." )
209209 print (get_colored_diff (old_text , new_text ))
210210 print ("Run `make pystubs` locally and commit the results for review." )
211+ print ("The resulting __init__.pyi file will be uploaded as an artifact on this job." )
211212 sys .exit (2 )
212213
213214
You can’t perform that action at this time.
0 commit comments