Skip to content

Conversation

@stefanpie
Copy link

This pull requests integrate generating Python stubs for the pyslang bindings into the CMake build process. Previously, the sub generation was done only in the CI which seemed like a brittle way to do it and prevents it from being included if building the package locally (ex. when running uv build). Also, on our end, the 9.1 release installed from PyPi did not have stubs. Hopefully, this pull request should also fix that issue.

Not sure what is the best way to test this. After my changes, I was able to run uv build, unpack the generated wheel, and manually check the stubs were included. I also installed the wheel into a fresh venv and the stubs are also in there was well. Not sure how to best test the CI integration, but that seems best left up to the maintainers.

@stefanpie
Copy link
Author

I created this pull request as an attempt to address the issue I describe in #1409

Since most of these changes are with the build and release process, it would be greatly appreciated for others to be able to test these changes independently of me to be sure they are correct and don't break any current build or release flows.

@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.48%. Comparing base (331ca18) to head (de32dc9).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1561   +/-   ##
=======================================
  Coverage   94.47%   94.48%           
=======================================
  Files         233      233           
  Lines       52941    52941           
=======================================
+ Hits        50018    50021    +3     
+ Misses       2923     2920    -3     

see 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 331ca18...de32dc9. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MikePopoloski
Copy link
Owner

Thanks for the PR. I'm in favor of the direction, though it looks like the stub generation is failing for reasons unclear to me. The original implementation was a contribution so I don't have a lot of knowledge about the process to begin with.

@stefanpie
Copy link
Author

Thanks for the feedback!
I think the issue is that the bindings are generated in a pyslang subfolder inside the pyslang wheel instead of the root. This means that this will appear to work from pyslang import pyslang and this won't work import pyslang. Should be easy to fix and test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants