[Mlir-commits] [mlir] [MLIR] [Python] Fixed a few issues in the type annotations (PR #183021)
Maksim Levental
llvmlistbot at llvm.org
Fri Mar 6 11:14:59 PST 2026
================
@@ -123,8 +123,30 @@ function(mlir_generate_type_stubs)
"IMPORT_PATHS;DEPENDS_TARGETS;OUTPUTS;DEPENDS_TARGET_SRC_DEPS"
${ARGN})
+ # Allow overriding the stubgen.py path or fetching a specific version
+ # from the nanobind repository, independent of the nanobind used for
+ # building. This is useful when a newer stubgen has bug fixes or features
+ # not yet available in the nanobind version used for compilation.
+ if(MLIR_NB_STUBGEN)
+ set(NB_STUBGEN "${MLIR_NB_STUBGEN}")
+ elseif(MLIR_NB_STUBGEN_VERSION)
+ set(_stubgen_path "${CMAKE_BINARY_DIR}/stubgen/${MLIR_NB_STUBGEN_VERSION}/stubgen.py")
----------------
makslevental wrote:
ok at least it worked on my mac. but can you try this on windows by hard coding `MLIR_NB_STUBGEN_VERSION=2ad68c400398915d31a815821ceb9fe1b7d08a71` and letting the pre-commit run
https://github.com/llvm/llvm-project/pull/183021
More information about the Mlir-commits
mailing list