Skip to content

Commit fd2c0db

Browse files
committed
MIT license, add imgui_version into the pyproject.toml file, render imgui version in docs
1 parent c2549e8 commit fd2c0db

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

DEVELOPMENT.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ MacOS:
99
```
1010
python3 -m venv .venv
1111
. .venv/bin/activate
12-
pip install git+https://github.com/wjakob/nanobind 'scikit-build-core[pyproject]' click glfw pyopengl numpy requests
12+
pip install git+https://github.com/wjakob/nanobind 'scikit-build-core[pyproject]' click glfw pyopengl numpy requests toml
1313
pip install --no-build-isolation -ve .
1414
python gen/gen_nb_enums.py > src/im_enums.inl
1515
```
@@ -19,7 +19,7 @@ Windows:
1919
```
2020
python3 -m venv .venv
2121
.venv\Scripts\activate.bat
22-
pip install git+https://github.com/wjakob/nanobind scikit-build-core[pyproject] click glfw pyopengl numpy
22+
pip install git+https://github.com/wjakob/nanobind scikit-build-core[pyproject] click glfw pyopengl numpy requests toml
2323
pip install --no-build-isolation -ve .
2424
python gen\gen_nb_enums.py > src\im_enums.inl
2525
```
@@ -39,4 +39,5 @@ NOTE NOTE! imconfig.h contains slimgui changes! Review after updating imgui.
3939
- update the imgui folder in the cimgui checkout with an imgui source release
4040
- cd generator && ./generator
4141
- dump the generator/output contents into gen/cimgui
42+
- update imgui version in pyproject.toml
4243
```

full_build.sh

+6
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ set -e
1111
python gen/gen_nb_enums.py > src/im_enums.inl
1212
pip install --no-build-isolation -ve .
1313

14+
# Get the value of tool.slimgui.imgui_version from pyproject.toml and
15+
# check that slimgui.get_version() returns the same value. It's to ensure
16+
# pyproject.toml imgui_version field is up to date.
17+
IMGUI_VERSION=$(python -c "import toml; print(toml.load('pyproject.toml')['tool']['slimgui']['imgui_version'])")
18+
python -c "import slimgui; assert slimgui.get_version() == '$IMGUI_VERSION'"
19+
1420
python -m nanobind.stubgen -i build/cp312-abi3-macosx_15_0_arm64 -q -m slimgui_ext -o src/slimgui/slimgui_ext.pyi
1521
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
1622
python gen/build_docs.py --pyi-file src/slimgui/slimgui_ext.pyi --output docs/index.html docs/apiref.md

pyproject.toml

+6-1
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,18 @@ authors = [
1212
{ name = "Janne Hellsten", email = "[email protected]" },
1313
]
1414
classifiers = [
15-
"License :: OSI Approved :: BSD License",
15+
"Development Status :: 3 - Alpha",
16+
"Intended Audience :: Developers",
17+
"License :: OSI Approved :: MIT License",
1618
]
1719

1820
[project.urls]
1921
Documentation = "https://nurpax.github.io/slimgui/"
2022
Repository = "https://github.com/nurpax/slimgui"
2123

24+
[tool.slimgui]
25+
imgui_version = "1.91.9"
26+
2227
[tool.pytest.ini_options]
2328
testpaths = [ "tests", "gen" ]
2429

0 commit comments

Comments
 (0)