File tree 3 files changed +16
-82
lines changed
3 files changed +16
-82
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,6 @@ set(Python_EXECUTABLE ".venv/Scripts/python.exe")
2
2
cmake_minimum_required (VERSION 3.15...3.27)
3
3
project (slimgui LANGUAGES CXX)
4
4
5
- # Extended stubgen for slimgui
6
- include (slimgui_stubgen.cmake)
7
-
8
5
# Try to import all Python components potentially needed by nanobind
9
6
find_package (Python 3.8
10
7
REQUIRED COMPONENTS Interpreter Development.Module
@@ -36,14 +33,6 @@ nanobind_add_module(slimgui_ext
36
33
src/c/imgui/imgui_widgets.cpp
37
34
)
38
35
39
- slimgui_add_stub(
40
- slimgui_ext_stub
41
- MODULE slimgui_ext
42
- OUTPUT "${CMAKE_SOURCE_DIR} /src/slimgui/slimgui_ext.pyi"
43
- PYTHON_PATH $<TARGET_FILE_DIR:slimgui_ext>
44
- DEPENDS slimgui_ext
45
- )
46
-
47
36
include_directories (${CMAKE_SOURCE_DIR} /src/c/imgui)
48
37
49
38
install (TARGETS slimgui_ext LIBRARY DESTINATION slimgui)
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Full build that builds the extension, the typing stub slimgui_ext.pyi, and all docs.
4
+ # This got a bit more complex so I don't know how to do this in cmake anymore.
5
+
6
+ # CI builds don't need to run this, as the .pyi file is checked into git.
7
+
8
+ set -e
9
+
10
+ # generate the enums
11
+ python gen/gen_nb_enums.py > src/im_enums.inl
12
+ pip install --no-build-isolation -ve .
13
+
14
+ python -m nanobind.stubgen -i build/cp312-abi3-macosx_15_0_arm64 -q -m slimgui_ext -o src/slimgui/slimgui_ext.pyi
15
+ python gen/amend_func_docs.py --cimgui-definitions-file gen/cimgui/definitions.json --imgui-h src/c/imgui/imgui.h --pyi-file src/slimgui/slimgui_ext.pyi -o src/slimgui/slimgui_ext.pyi
16
+ python gen/build_docs.py --pyi-file src/slimgui/slimgui_ext.pyi --output docs/index.html docs/apiref.md
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments