Johnfreeman/daq cmake issue174 install pyi files - #175
Open
jcfreeman2 wants to merge 7 commits into
Open
Conversation
…ommit * Removed unnecessary / flawed attempt to forward PYTHONPATH to the pybind11-stubgen call * Added "ALL" to add_custom_target so the generation of *.pyi files will actually occur * Install the *.pyi files
…a installations) pybind11-stubgen fails because it can't Python-import a package, copy the full Python code over to the build area
…ndard PYTHONPATH + the local package Python directory
…ly generated for DAL libraries. The work in this commit has brought up ideas for improvement addressed by my TODOs
…ft link is already there
…atively indicate to daq_add_python_bindings that you wish to generate pybind11-stubgen stubs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
With this PR, if you pass a
GENERATE_STUBSoption todaq_add_python_bindings, the function will usepybind11-stubgento generate*.pyifiles off the bindings. This enablesmypyto engage in a kind of type checking for Python code. See issue #174 for details.To test, I've created a test build using this feature branch,
MYPYFD_DEV_260804_A9which passes the standard and extended integration tests. Note in the test build thatGENERATE_STUBSwas only passed todaq_add_python_bindingsinconffwkandconfgen; you can look for*.pyifiles in those installations. Also looking for (official) confirmation from Pawel that the*.pyifiles are accomplishing what CCM/Python developers are hoping for. Note I've added brief documentation both in theREADME.mdand in-code comments.Type of change
Testing checklist
dbt-build --unittest)pytest -s minimal_system_quick_test.py)dunedaq_integtest_bundle.sh)python -m pytest)pre-commit run --all-files)Of course, some of the above is N/A to a daq-cmake change.
Further checks
dbt-build --lint, and/or see https://dune-daq-sw.readthedocs.io/en/latest/packages/styleguide/)(Indicate issue here: # (issue))