Skip to content

Commit 1bb83fd

Browse files
committed
Fix stubs generator not running in windows
1 parent 476ee4c commit 1bb83fd

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

modules/python/stubs/run_stub_generator.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,8 @@
4747
output_root = Path(args.output_root)
4848
assert output_root.exists()
4949
bin_folder = Path(sys.executable).parent
50-
stubgen_entry_point = bin_folder / 'pybind11-stubgen'
51-
assert stubgen_entry_point.exists()
5250

53-
subprocess.run([str(stubgen_entry_point), '-o', str(output_root.absolute()), '--ignore-all-errors', '_visp'], check=True)
51+
subprocess.run([sys.executable, '-m', 'pybind11_stubgen', '-o', str(output_root.absolute()), '--ignore-all-errors', '_visp'], check=True)
5452

5553
# Generate stubs for the bindings (C++ side) and mock it so that they appear in the true 'visp' package
5654
p = Path('./_visp')

0 commit comments

Comments
 (0)