Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to import pyi stubs as modules #978

Open
LecrisUT opened this issue Jan 30, 2025 · 0 comments
Open

Option to import pyi stubs as modules #978

LecrisUT opened this issue Jan 30, 2025 · 0 comments

Comments

@LecrisUT
Copy link
Collaborator

The usecase for this is when we are building the documentation and using autodoc to avoid import failures and avoid cmake building. The user could have something like this setup

[[tool.scikit-build.overrides]]
if.any.env.READTHEDOCS = true
if.any.env.BUILD_DOCS = true
wheel.cmake = false

The logic to be added is that if there is a .pyi stub file without a .py original, then:

  • regular: copy the stub file to a .py file
  • edittable installs: probably ScikitBuildRedirectingFinder needs to be changed to detect .pyi files as modules
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

No branches or pull requests

1 participant