Skip to content

Fix Python stub installation with sanitizers enabled - #526

Open
jeongseok-meta wants to merge 1 commit into
mitsuba-renderer:masterfrom
jeongseok-meta:fix-sanitizer-stub-install
Open

Fix Python stub installation with sanitizers enabled#526
jeongseok-meta wants to merge 1 commit into
mitsuba-renderer:masterfrom
jeongseok-meta:fix-sanitizer-stub-install

Conversation

@jeongseok-meta

@jeongseok-meta jeongseok-meta commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Motivation

Sanitizer builds deliberately skip Python stub generation, but the install rules still list the absent .pyi and py.typed files, so cmake --install fails. Those builds still need the empty runtime module files used by drjit, drjit.llvm, and drjit.auto.

This keeps the existing sanitizer behavior without adding a user-facing option to disable stubs.

This is an independent upstream-only cleanup with no corresponding conda-forge patch, so it does not require a downstream patch-removal follow-up. The clean-output-directory issue is handled separately in #525.

Changes

  • Stop installing absent stub and marker files when sanitizers disable stub generation.
  • Create and install the empty drjit.auto runtime modules for sanitizer builds.
  • Preserve full stub generation and installation for normal builds.

Validation

  • Reproduced the current ASan install failure at missing drjit/__init__.pyi.
  • Built and installed Python + LLVM with ASan; verified runtime modules are present, stubs are absent, and drjit, drjit.llvm, and drjit.auto import with libasan preloaded.
  • Configured UBSan, built drjit-auto-stub, and verified the generated install manifest has no .pyi or py.typed entries.
  • Built and installed a normal Python + LLVM configuration (pre-creating the drjit/auto build directory to isolate the separate directory-creation issue in #525); verified all 15 existing stub/marker files and the same imports.
  • git diff --check

@jeongseok-meta jeongseok-meta changed the title Fix installation with sanitizers enabled Fix Python stub installation with sanitizers enabled Jul 21, 2026
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.

1 participant