-
Notifications
You must be signed in to change notification settings - Fork 117
Expand file tree
/
Copy pathpyproject.toml
More file actions
304 lines (266 loc) · 9.88 KB
/
pyproject.toml
File metadata and controls
304 lines (266 loc) · 9.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
[build-system]
requires = ["scikit-build-core>=0.11.0", "nanobind>=2.4.0"]
build-backend = "scikit_build_core.build"
# To debug build backend, replace by:
# cf https://peps.python.org/pep-0517/#in-tree-build-backends
# requires = ["pybind11", "packaging", "pathspec"]
# build-backend = "scikit_build_core.build"
# backend-path = ["_backends/scikit-build-core/src/"]
[project]
name = "imgui-bundle"
version = "1.92.801" # Based on ImGui 1.92.8 - Remember to mirror changes on line 3 of main CMakeLists! Version = ImGui patch × 100 + bundle release. (also remember to update pyodide_projects/pyodide_test_bundle/test_local_pyodide.html and test_cdn_pyodide_local_wheel.html with the new version.)
description="Dear ImGui Bundle: From expressive code to powerful GUIs in no time. A fast, feature-rich, cross-platform toolkit for C++ and Python."
readme = "bindings/imgui_bundle/Readme_pypi.md"
authors = [ { name = "Pascal Thomet", email = "pthomet@gmail.com" } ]
requires-python = ">=3.10"
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
"Topic :: Scientific/Engineering",
"Typing :: Typed",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
]
dependencies = []
[project.optional-dependencies]
# To be able to display plots
matplotlib = ["matplotlib", "numpy"]
# To use image processing features
imgproc = ["pillow", "opencv-python"]
pydantic = ["pydantic>=2.0.0"]
# For pure python backends
opengl = ["PyOpenGL"]
glfw = ["glfw"]
sdl2 = ["PySDL2"]
sdl3 = ["PySDL3"]
wgpu = ["wgpu", "rendercanvas"]
pyglet = ["pyglet"]
all_backends = [
"PyOpenGL",
"glfw",
"PySDL2",
"PySDL3",
"wgpu",
"rendercanvas",
"pyglet",
"pygame",
]
# full installation
full = [
# Core
"numpy",
"pydantic>=2.0.0",
# Images
"pillow",
"opencv-python",
# Scientific packages
"jupyterlab",
"notebook",
"matplotlib",
# fiatlight
"fiatlight",
"pandas",
"pandas-stubs",
# Backends
"PyOpenGL",
"glfw",
"PySDL2",
"PySDL3",
"wgpu",
"rendercanvas",
"pyglet",
"pygame",
"PyGLM",
]
# For development and testing
test = ["pytest", "pytest-asyncio", "mypy"]
[project.urls]
Homepage = "https://imgui-bundle.pages.dev/"
Documentation = "https://imgui-bundle.pages.dev/"
Repository = "https://github.com/pthom/imgui_bundle"
Issues = "https://github.com/pthom/imgui_bundle/issues"
Changelog = "https://github.com/pthom/imgui_bundle/blob/main/CHANGELOG.md"
[project.scripts]
demo_imgui_bundle="imgui_bundle.demos_python.demo_imgui_bundle:main"
imgui_bundle_demo="imgui_bundle.demos_python.demo_imgui_bundle:main"
[tool.scikit-build]
wheel.expand-macos-universal-tags = true
wheel.packages = ["bindings/imgui_bundle"]
wheel.exclude = ["lib/**", "include/**"]
sdist.exclude = [
".git",
".github",
"/external/*/.git",
"/ci_scripts/",
"/docs/",
"/imgui_bundle_assets/", # only for C++ apps
"/_example_integration/", # C++ template
"/pyodide_projects/", # Playground only
"/logo/",
# Build artifacts
"/build*/",
"/external/*/build*/",
"/_skbuild/",
"*.so",
"*.dylib",
"*.dll",
"*.pyd",
"*.egg-info/",
"__pycache__/",
# Virtual environments
"/venv*/",
"/.venv*/",
"/v3*/",
# Dependency managers & pip outputs
"/vcpkg/",
"/dist/",
"/wheelhouse/",
]
# Slim wheel for Pyodide builds: exclude things the browser playground doesn't need.
# Set IMGUI_BUNDLE_SLIM_PYODIDE_WHEEL=1 to activate.
#
# Excluded:
# - demos_cpp/, demos_python/, demos_assets/ (the C++/Python demo folders;
# the playground ships its own examples and doesn't load these)
# - assets/fonts/latex/ (~876 KB of LaTeX math fonts;
# downloaded lazily from a CDN on first immapp.run(with_latex=True) call,
# see bindings/imgui_bundle/_pyodide_latex_fonts.py)
[[tool.scikit-build.overrides]]
if.env.IMGUI_BUNDLE_SLIM_PYODIDE_WHEEL = true
wheel.exclude = [
"imgui_bundle/demos_cpp/**",
"imgui_bundle/demos_python/**",
"imgui_bundle/demos_assets/**",
"imgui_bundle/assets/fonts/latex/**",
]
cmake.version = ">=3.26.1"
build.verbose = true
logging.level = "INFO"
#####################################
# Mypy, Ruff and linters
#####################################
[tool.isort]
profile = "black"
[tool.ruff]
include = ["bindings/imgui_bundle/**/*.py", "bindings/imgui_bundle/**/*.pyi"]
[tool.mypy]
packages = ["imgui_bundle"]
disable_error_code = ["attr-defined"]
warn_return_any = true
warn_unused_configs = true
check_untyped_defs = true
disallow_any_generics = true
disallow_subclassing_any = true
disallow_untyped_decorators = true
disallow_incomplete_defs = true
no_implicit_optional = true
strict_equality = true
warn_redundant_casts = true
disallow_untyped_defs = true
warn_unused_ignores = false
# disallow_untyped_calls = true
[[tool.mypy.overrides]]
module = "imgui_bundle.python_backends.*"
disallow_untyped_defs = false
check_untyped_defs = false
warn_unused_ignores = false
[[tool.mypy.overrides]]
module = "imgui_bundle.python_backends.python_backends_disabled.*"
ignore_errors = true
[[tool.mypy.overrides]]
module = [
"imgui_bundle.demos_python.sandbox.compare_other_libs.*",
"imgui_bundle.demos_python.sandbox.compare_wordle.*",
]
ignore_errors = true
[[tool.mypy.overrides]]
module = "imgui_bundle.demos_python.*"
disable_error_code = ["attr-defined", "no-untyped-def"]
[[tool.mypy.overrides]]
module = ["OpenGL.*", "glfw.*", "glm"]
ignore_missing_imports = true
#####################################
# Wheels options
#####################################
[tool.cibuildwheel]
build-verbosity = 1
# Target python versions:
build = ["cp311-*", "cp312-*", "cp313-*", "cp314-*"]
# Tests : we ignore the python GUI tests here, as they require a display
# (note: those tests are run in the pip.yml GitHub actions workflows)
test-requires = ["pytest", "pytest-asyncio", "numpy"]
test-command = "pytest {project}/tests --ignore={project}/tests/tests_python_gui"
#------------------------------------
# macos wheels options
#------------------------------------
[tool.cibuildwheel.macos]
# identify whether this is a M1 or intel
before-build = "uname -a"
# Skip trying to test arm64 builds on Intel Macs
# test-skip = ["*-macosx_arm64 *-macosx_universal2:arm64"]
#
# Skip trying to test x86_64 builds on Mac M1
# test-skip = ["*-macosx_x86_64 *-macosx_universal2:x86_64"]
# test-skip = ["*-macosx_arm64 *-macosx_universal2:arm64"]
test-skip = ["*"]
# Environment variables
environment = { MACOSX_DEPLOYMENT_TARGET="14.0" }
# Apple Silicon only — Intel Macs discontinued in 2020, GitHub dropping Intel runners in 2027.
archs = ["arm64"]
#------------------------------------
# linux wheels options
#------------------------------------
[tool.cibuildwheel.linux]
skip = ["*i686"]
test-skip = ["*-musllinux_*"] # issue with OpenGL on musllinux
# Install glfw dev packages on manylinux:
# --------------------------------------
# https://www.glfw.org/docs/3.3/compile.html#compile_deps
# https://iscinumpy.dev/post/cibuildwheel-2-2-0/
# cibuildwheel has added a new platform: musllinux
# Remember, the manylinux1 image has been in maintenance mode, has no support for Python 3.10,
# and will be fully retired at the end of 2021.
#
# This also means that installing things inside the images can vary even further;
# * manylinux1 (CentOS 5), manylinux2010 (CentOS 6), and manylinux2014 (CentOS 7) all use yum;
# => yum install -y libXcursor-devel libXi-devel libXinerama-devel libXrandr-devel
# * manylinux_2_24 (Debian 8) uses apt (and is stuck on GCC 6),
# => apt install xorg-dev
# * musllinux_1_1 MUSL based distributions of Linux (like Alpine). uses apk
#
# Also, do the equivalent of:
# sudo apt-get install -y xorg-dev libgl1-mesa-dev libglfw3-dev libglew-dev xvfb
# sudo apt-get install -y libgl1-mesa-dev
before-all = "yum install -y libXcursor-devel libXi-devel libXinerama-devel libXrandr-devel mesa-libGL-devel"
[[tool.cibuildwheel.overrides]]
select = "*-musllinux*"
before-all = "apk add xorg-server-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev mesa-dev mesa-gl cmake curl bash"
#------------------------------------
# windows wheels options
#------------------------------------
[tool.cibuildwheel.windows]
skip = ["*win32"]
#------------------------------------
# android wheels
#------------------------------------
# Android wheel support is experimental, and available in a separate branch (not officially supported at the moment)
# See: https://github.com/pthom/imgui_bundle/tree/android-wheel
# Related PR: https://github.com/pthom/imgui_bundle/pull/438
# ═══════════════════════════════════════════════════════════════════════════
# Custom Build Configurations
# ═══════════════════════════════════════════════════════════════════════════
# You may disable some submodules of imgui_bundle if you do not need them.
# Common cases are:
# 1. to disable immvision
# Pass -DIMGUI_BUNDLE_WITH_IMMVISION=OFF, e.g.:
# CMAKE_ARGS="-DIMGUI_BUNDLE_WITH_IMMVISION=OFF" pip install -v .
# or
# CMAKE_ARGS="-DIMGUI_BUNDLE_WITH_IMMVISION=OFF" python -m build --wheel
# Note: immvision no longer requires OpenCV. It works fully without it.
# OpenCV support is optional (behind IMMVISION_HAS_OPENCV).
#
# 2. to disable hello_imgui (to avoid the windowing dependencies)
# Pass -DIMGUI_BUNDLE_WITH_HELLO_IMGUI=OFF, e.g.:
# CMAKE_ARGS="-DIMGUI_BUNDLE_WITH_HELLO_IMGUI=OFF" pip install -v .
# If you disable hello_imgui, several dependent modules will be auto-disabled:
# immapp, imgui_md, im_file_dialog, imgui_tex_inspect, immvision, imgui_test_engine, and the glfw backend.