From 1bb83fdb451649a3e473511985d1149d7b754baf Mon Sep 17 00:00:00 2001 From: Samuel Felton Date: Wed, 7 Feb 2024 18:29:19 +0100 Subject: [PATCH] Fix stubs generator not running in windows --- modules/python/stubs/run_stub_generator.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/python/stubs/run_stub_generator.py b/modules/python/stubs/run_stub_generator.py index 129c73f9bb..c8b904112d 100644 --- a/modules/python/stubs/run_stub_generator.py +++ b/modules/python/stubs/run_stub_generator.py @@ -47,10 +47,8 @@ output_root = Path(args.output_root) assert output_root.exists() bin_folder = Path(sys.executable).parent - stubgen_entry_point = bin_folder / 'pybind11-stubgen' - assert stubgen_entry_point.exists() - subprocess.run([str(stubgen_entry_point), '-o', str(output_root.absolute()), '--ignore-all-errors', '_visp'], check=True) + subprocess.run([sys.executable, '-m', 'pybind11_stubgen', '-o', str(output_root.absolute()), '--ignore-all-errors', '_visp'], check=True) # Generate stubs for the bindings (C++ side) and mock it so that they appear in the true 'visp' package p = Path('./_visp')