meltygui-imgui 2.0.0.post1__tar.gz → 2.0.0.post3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/MELTYGUI.md +26 -5
  2. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/PKG-INFO +36 -12
  3. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/README.md +26 -5
  4. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/meltygui_imgui/core.cpp +14 -14
  5. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/meltygui_imgui.egg-info/PKG-INFO +36 -12
  6. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/meltygui_imgui.egg-info/SOURCES.txt +1 -0
  7. meltygui_imgui-2.0.0.post3/pyproject.toml +6 -0
  8. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/setup.py +30 -2
  9. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/tools/build.py +5 -3
  10. meltygui_imgui-2.0.0.post3/tools/build_in_container.sh +32 -0
  11. meltygui_imgui-2.0.0.post3/tools/build_windows.py +59 -0
  12. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/tools/smoke.py +1 -1
  13. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/tools/verify.py +36 -17
  14. meltygui_imgui-2.0.0.post1/pyproject.toml +0 -4
  15. meltygui_imgui-2.0.0.post1/tools/build_in_container.sh +0 -21
  16. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/LICENSE +0 -0
  17. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/LICENSES/imgui-MIT.txt +0 -0
  18. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/LICENSES/imstb_rectpack.h.license.txt +0 -0
  19. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/LICENSES/imstb_textedit.h.license.txt +0 -0
  20. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/LICENSES/imstb_truetype.h.license.txt +0 -0
  21. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/MANIFEST.in +0 -0
  22. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/UPSTREAM.json +0 -0
  23. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/ansifeed-cpp/AnsiTextColored.cpp +0 -0
  24. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/ansifeed-cpp/AnsiTextColored.h +0 -0
  25. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/config-cpp/py_imconfig.cpp +0 -0
  26. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/config-cpp/py_imconfig.h +0 -0
  27. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/backends/imgui_impl_allegro5.cpp +0 -0
  28. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/backends/imgui_impl_allegro5.h +0 -0
  29. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/backends/imgui_impl_android.cpp +0 -0
  30. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/backends/imgui_impl_android.h +0 -0
  31. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/backends/imgui_impl_dx10.cpp +0 -0
  32. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/backends/imgui_impl_dx10.h +0 -0
  33. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/backends/imgui_impl_dx11.cpp +0 -0
  34. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/backends/imgui_impl_dx11.h +0 -0
  35. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/backends/imgui_impl_dx12.cpp +0 -0
  36. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/backends/imgui_impl_dx12.h +0 -0
  37. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/backends/imgui_impl_dx9.cpp +0 -0
  38. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/backends/imgui_impl_dx9.h +0 -0
  39. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/backends/imgui_impl_glfw.cpp +0 -0
  40. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/backends/imgui_impl_glfw.h +0 -0
  41. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/backends/imgui_impl_glut.cpp +0 -0
  42. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/backends/imgui_impl_glut.h +0 -0
  43. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/backends/imgui_impl_marmalade.cpp +0 -0
  44. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/backends/imgui_impl_marmalade.h +0 -0
  45. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/backends/imgui_impl_metal.h +0 -0
  46. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/backends/imgui_impl_opengl2.cpp +0 -0
  47. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/backends/imgui_impl_opengl2.h +0 -0
  48. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/backends/imgui_impl_opengl3.cpp +0 -0
  49. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/backends/imgui_impl_opengl3.h +0 -0
  50. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/backends/imgui_impl_osx.h +0 -0
  51. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/backends/imgui_impl_sdl.cpp +0 -0
  52. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/backends/imgui_impl_sdl.h +0 -0
  53. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/backends/imgui_impl_vulkan.cpp +0 -0
  54. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/backends/imgui_impl_vulkan.h +0 -0
  55. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/backends/imgui_impl_wgpu.cpp +0 -0
  56. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/backends/imgui_impl_wgpu.h +0 -0
  57. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/backends/imgui_impl_win32.cpp +0 -0
  58. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/backends/imgui_impl_win32.h +0 -0
  59. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/imconfig.h +0 -0
  60. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/imgui.cpp +0 -0
  61. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/imgui.h +0 -0
  62. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/imgui_demo.cpp +0 -0
  63. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/imgui_draw.cpp +0 -0
  64. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/imgui_internal.h +0 -0
  65. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/imgui_tables.cpp +0 -0
  66. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/imgui_widgets.cpp +0 -0
  67. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/imstb_rectpack.h +0 -0
  68. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/imstb_textedit.h +0 -0
  69. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/imstb_truetype.h +0 -0
  70. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/misc/cpp/imgui_stdlib.cpp +0 -0
  71. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/misc/cpp/imgui_stdlib.h +0 -0
  72. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/misc/fonts/binary_to_compressed_c.cpp +0 -0
  73. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/misc/freetype/imgui_freetype.cpp +0 -0
  74. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/misc/freetype/imgui_freetype.h +0 -0
  75. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/imgui-cpp/misc/single_file/imgui_single_file.h +0 -0
  76. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/meltygui_imgui/__init__.py +0 -0
  77. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/meltygui_imgui/_compat.py +0 -0
  78. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/meltygui_imgui/ansifeed.pxd +0 -0
  79. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/meltygui_imgui/cimgui.pxd +0 -0
  80. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/meltygui_imgui/common.pyx +0 -0
  81. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/meltygui_imgui/core.h +0 -0
  82. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/meltygui_imgui/core.pxd +0 -0
  83. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/meltygui_imgui/core.pyx +0 -0
  84. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/meltygui_imgui/enums.pxd +0 -0
  85. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/meltygui_imgui/enums_internal.pxd +0 -0
  86. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/meltygui_imgui/extra.py +0 -0
  87. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/meltygui_imgui/integrations/__init__.py +0 -0
  88. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/meltygui_imgui/integrations/base.py +0 -0
  89. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/meltygui_imgui/integrations/cocos2d.py +0 -0
  90. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/meltygui_imgui/integrations/glfw.py +0 -0
  91. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/meltygui_imgui/integrations/glumpy.py +0 -0
  92. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/meltygui_imgui/integrations/opengl.py +0 -0
  93. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/meltygui_imgui/integrations/pygame.py +0 -0
  94. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/meltygui_imgui/integrations/pyglet.py +0 -0
  95. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/meltygui_imgui/integrations/sdl2.py +0 -0
  96. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/meltygui_imgui/internal.cpp +0 -0
  97. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/meltygui_imgui/internal.h +0 -0
  98. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/meltygui_imgui/internal.pxd +0 -0
  99. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/meltygui_imgui/internal.pyx +0 -0
  100. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/meltygui_imgui.egg-info/dependency_links.txt +0 -0
  101. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/meltygui_imgui.egg-info/requires.txt +4 -4
  102. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/meltygui_imgui.egg-info/top_level.txt +0 -0
  103. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/setup.cfg +0 -0
  104. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/tests/test_begin_end_context_managers.py +0 -0
  105. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/tests/test_context_mem_safety.py +0 -0
  106. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/tests/test_crazy_callbacks.py +0 -0
  107. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/tests/test_graphics_mem_safety.py +0 -0
  108. {meltygui_imgui-2.0.0.post1 → meltygui_imgui-2.0.0.post3}/tests/test_gui_style_initialization.py +0 -0
@@ -12,9 +12,20 @@ uv pip install meltygui-imgui
12
12
  import meltygui_imgui
13
13
  ```
14
14
 
15
- The first release is **2.0.0.post1**, supporting Linux x86-64, CPython 3.12 and
16
- glibc 2.28 or newer. It installs `meltygui_imgui` without overwriting the upstream
17
- `imgui` package. Other platforms and Python versions are not supported yet.
15
+ The current release is **2.0.0.post3**, with wheels for Linux x86-64 (glibc 2.28
16
+ or newer) and Windows x86-64 on CPython 3.11, 3.12 and 3.13. It installs `meltygui_imgui` without
17
+ overwriting the upstream `imgui` package. The 3.13 wheel is generated with
18
+ Cython 3.2; 3.11 and 3.12 keep the Cython 0.29 bindings.
19
+
20
+ ### When no wheel matches
21
+
22
+ On any other platform or Python, pip and uv fall back to the source archive
23
+ without saying that no wheel matched. The build prints a banner naming your
24
+ platform and the prebuilt targets (installers show it with `-v`, or when the
25
+ build fails). A source build needs a C++ compiler and takes a few minutes. uv
26
+ ignores the upper Python bound, so on a newer Python it also builds from
27
+ source; pip refuses instead. Pass `--only-binary meltygui-imgui` to make a
28
+ missing wheel an error rather than a compilation.
18
29
 
19
30
  The bundled Dear ImGui and font-helper license notices are included in the artifacts.
20
31
 
@@ -32,10 +43,20 @@ uvx --from twine==7.0.0 twine check --strict dist/*.whl dist/*.tar.gz
32
43
 
33
44
  Use `--sudo-docker` if Docker requires sudo. Source builds require a C++ compiler.
34
45
 
46
+ The Windows wheels are built on Windows from that same source archive. With the
47
+ MSVC build tools and uv installed, and the archive from `tools/build.py` in `dist`:
48
+
49
+ ```sh
50
+ python tools/build_windows.py
51
+ python tools/verify.py dist --platform windows
52
+ ```
53
+
54
+ delvewheel bundles the MSVC C++ runtime, so the wheels need no redistributable.
55
+
35
56
  ## Publish
36
57
 
37
58
  Pushes to `main` and pull requests build and test without uploading. A `v*` tag
38
- or a manual run with `publish=true` publishes the verified wheel and source
59
+ or a manual run with `publish=true` publishes the verified Linux and Windows wheels and the source
39
60
  archive through PyPI trusted publishing. Published versions cannot be replaced.
40
61
 
41
62
  Configure a pending GitHub publisher at https://pypi.org/manage/account/publishing/:
@@ -48,7 +69,7 @@ Configure a pending GitHub publisher at https://pypi.org/manage/account/publishi
48
69
  | Workflow | `release.yml` |
49
70
  | Environment | `pypi` |
50
71
 
51
- Then, after the main-branch build passes, create and push `v2.0.0.post1`.
72
+ Then, after the main-branch build passes, create and push `v2.0.0.post3`.
52
73
  No API token belongs in this repository.
53
74
 
54
75
  ## Licenses and changes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meltygui-imgui
3
- Version: 2.0.0.post1
3
+ Version: 2.0.0.post3
4
4
  Summary: Cython-based Python bindings for dear meltygui_imgui
5
5
  Home-page: https://github.com/Attentio-AI/meltygui-imgui
6
6
  Author: Michał Jaworski
@@ -8,12 +8,15 @@ Author-email: swistakm@gmail.com
8
8
  License: BSD
9
9
  Classifier: Intended Audience :: Developers
10
10
  Classifier: License :: OSI Approved :: BSD License
11
+ Classifier: Programming Language :: Python :: 3.11
11
12
  Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Python :: 3.13
12
14
  Classifier: Programming Language :: Python :: Implementation :: CPython
13
15
  Classifier: Programming Language :: Cython
14
16
  Classifier: Operating System :: POSIX :: Linux
17
+ Classifier: Operating System :: Microsoft :: Windows
15
18
  Classifier: Topic :: Games/Entertainment
16
- Requires-Python: >=3.12,<3.13
19
+ Requires-Python: >=3.11,<3.14
17
20
  Description-Content-Type: text/markdown
18
21
  License-File: LICENSE
19
22
  License-File: LICENSES/imgui-MIT.txt
@@ -42,14 +45,14 @@ Requires-Dist: PyOpenGL; extra == "pyglet"
42
45
  Requires-Dist: pyglet; sys_platform != "darwin" and extra == "pyglet"
43
46
  Requires-Dist: pyglet>=1.5.6; sys_platform == "darwin" and extra == "pyglet"
44
47
  Provides-Extra: full
45
- Requires-Dist: PySDL2; extra == "full"
46
- Requires-Dist: Cython<0.30,>=0.24; extra == "full"
47
- Requires-Dist: glfw; extra == "full"
48
- Requires-Dist: cocos2d; extra == "full"
49
- Requires-Dist: pygame; extra == "full"
50
48
  Requires-Dist: PyOpenGL; extra == "full"
49
+ Requires-Dist: pygame; extra == "full"
50
+ Requires-Dist: glfw; extra == "full"
51
51
  Requires-Dist: pyglet>=1.5.6; sys_platform == "darwin" and extra == "full"
52
+ Requires-Dist: cocos2d; extra == "full"
53
+ Requires-Dist: PySDL2; extra == "full"
52
54
  Requires-Dist: pyglet; sys_platform != "darwin" and extra == "full"
55
+ Requires-Dist: Cython<0.30,>=0.24; extra == "full"
53
56
  Dynamic: author
54
57
  Dynamic: author-email
55
58
  Dynamic: classifier
@@ -76,9 +79,20 @@ uv pip install meltygui-imgui
76
79
  import meltygui_imgui
77
80
  ```
78
81
 
79
- The first release is **2.0.0.post1**, supporting Linux x86-64, CPython 3.12 and
80
- glibc 2.28 or newer. It installs `meltygui_imgui` without overwriting the upstream
81
- `imgui` package. Other platforms and Python versions are not supported yet.
82
+ The current release is **2.0.0.post3**, with wheels for Linux x86-64 (glibc 2.28
83
+ or newer) and Windows x86-64 on CPython 3.11, 3.12 and 3.13. It installs `meltygui_imgui` without
84
+ overwriting the upstream `imgui` package. The 3.13 wheel is generated with
85
+ Cython 3.2; 3.11 and 3.12 keep the Cython 0.29 bindings.
86
+
87
+ ### When no wheel matches
88
+
89
+ On any other platform or Python, pip and uv fall back to the source archive
90
+ without saying that no wheel matched. The build prints a banner naming your
91
+ platform and the prebuilt targets (installers show it with `-v`, or when the
92
+ build fails). A source build needs a C++ compiler and takes a few minutes. uv
93
+ ignores the upper Python bound, so on a newer Python it also builds from
94
+ source; pip refuses instead. Pass `--only-binary meltygui-imgui` to make a
95
+ missing wheel an error rather than a compilation.
82
96
 
83
97
  The bundled Dear ImGui and font-helper license notices are included in the artifacts.
84
98
 
@@ -96,10 +110,20 @@ uvx --from twine==7.0.0 twine check --strict dist/*.whl dist/*.tar.gz
96
110
 
97
111
  Use `--sudo-docker` if Docker requires sudo. Source builds require a C++ compiler.
98
112
 
113
+ The Windows wheels are built on Windows from that same source archive. With the
114
+ MSVC build tools and uv installed, and the archive from `tools/build.py` in `dist`:
115
+
116
+ ```sh
117
+ python tools/build_windows.py
118
+ python tools/verify.py dist --platform windows
119
+ ```
120
+
121
+ delvewheel bundles the MSVC C++ runtime, so the wheels need no redistributable.
122
+
99
123
  ## Publish
100
124
 
101
125
  Pushes to `main` and pull requests build and test without uploading. A `v*` tag
102
- or a manual run with `publish=true` publishes the verified wheel and source
126
+ or a manual run with `publish=true` publishes the verified Linux and Windows wheels and the source
103
127
  archive through PyPI trusted publishing. Published versions cannot be replaced.
104
128
 
105
129
  Configure a pending GitHub publisher at https://pypi.org/manage/account/publishing/:
@@ -112,7 +136,7 @@ Configure a pending GitHub publisher at https://pypi.org/manage/account/publishi
112
136
  | Workflow | `release.yml` |
113
137
  | Environment | `pypi` |
114
138
 
115
- Then, after the main-branch build passes, create and push `v2.0.0.post1`.
139
+ Then, after the main-branch build passes, create and push `v2.0.0.post3`.
116
140
  No API token belongs in this repository.
117
141
 
118
142
  ## Licenses and changes
@@ -12,9 +12,20 @@ uv pip install meltygui-imgui
12
12
  import meltygui_imgui
13
13
  ```
14
14
 
15
- The first release is **2.0.0.post1**, supporting Linux x86-64, CPython 3.12 and
16
- glibc 2.28 or newer. It installs `meltygui_imgui` without overwriting the upstream
17
- `imgui` package. Other platforms and Python versions are not supported yet.
15
+ The current release is **2.0.0.post3**, with wheels for Linux x86-64 (glibc 2.28
16
+ or newer) and Windows x86-64 on CPython 3.11, 3.12 and 3.13. It installs `meltygui_imgui` without
17
+ overwriting the upstream `imgui` package. The 3.13 wheel is generated with
18
+ Cython 3.2; 3.11 and 3.12 keep the Cython 0.29 bindings.
19
+
20
+ ### When no wheel matches
21
+
22
+ On any other platform or Python, pip and uv fall back to the source archive
23
+ without saying that no wheel matched. The build prints a banner naming your
24
+ platform and the prebuilt targets (installers show it with `-v`, or when the
25
+ build fails). A source build needs a C++ compiler and takes a few minutes. uv
26
+ ignores the upper Python bound, so on a newer Python it also builds from
27
+ source; pip refuses instead. Pass `--only-binary meltygui-imgui` to make a
28
+ missing wheel an error rather than a compilation.
18
29
 
19
30
  The bundled Dear ImGui and font-helper license notices are included in the artifacts.
20
31
 
@@ -32,10 +43,20 @@ uvx --from twine==7.0.0 twine check --strict dist/*.whl dist/*.tar.gz
32
43
 
33
44
  Use `--sudo-docker` if Docker requires sudo. Source builds require a C++ compiler.
34
45
 
46
+ The Windows wheels are built on Windows from that same source archive. With the
47
+ MSVC build tools and uv installed, and the archive from `tools/build.py` in `dist`:
48
+
49
+ ```sh
50
+ python tools/build_windows.py
51
+ python tools/verify.py dist --platform windows
52
+ ```
53
+
54
+ delvewheel bundles the MSVC C++ runtime, so the wheels need no redistributable.
55
+
35
56
  ## Publish
36
57
 
37
58
  Pushes to `main` and pull requests build and test without uploading. A `v*` tag
38
- or a manual run with `publish=true` publishes the verified wheel and source
59
+ or a manual run with `publish=true` publishes the verified Linux and Windows wheels and the source
39
60
  archive through PyPI trusted publishing. Published versions cannot be replaced.
40
61
 
41
62
  Configure a pending GitHub publisher at https://pypi.org/manage/account/publishing/:
@@ -48,7 +69,7 @@ Configure a pending GitHub publisher at https://pypi.org/manage/account/publishi
48
69
  | Workflow | `release.yml` |
49
70
  | Environment | `pypi` |
50
71
 
51
- Then, after the main-branch build passes, create and push `v2.0.0.post1`.
72
+ Then, after the main-branch build passes, create and push `v2.0.0.post3`.
52
73
  No API token belongs in this repository.
53
74
 
54
75
  ## Licenses and changes
@@ -49906,26 +49906,26 @@ static PyObject *__pyx_pf_14meltygui_imgui_4core_40begin_child(CYTHON_UNUSED PyO
49906
49906
  }
49907
49907
  __pyx_L6:;
49908
49908
  while (1) {
49909
- __pyx_t_3 = PyInt_Check(__pyx_v_arg);
49910
- __pyx_t_4 = (__pyx_t_3 != 0);
49911
- if (!__pyx_t_4) {
49912
- } else {
49913
- __pyx_t_2 = __pyx_t_4;
49914
- goto __pyx_L12_bool_binop_done;
49915
- }
49916
- __pyx_t_4 = PyLong_Check(__pyx_v_arg);
49917
- __pyx_t_3 = (__pyx_t_4 != 0);
49918
- __pyx_t_2 = __pyx_t_3;
49919
- __pyx_L12_bool_binop_done:;
49909
+ __pyx_t_2 = PyString_Check(__pyx_v_arg);
49920
49910
  __pyx_t_3 = (__pyx_t_2 != 0);
49921
49911
  if (__pyx_t_3) {
49922
- if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_ImGuiID, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(0, 4289, __pyx_L1_error)
49912
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_str, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(0, 4289, __pyx_L1_error)
49923
49913
  goto __pyx_L10_break;
49924
49914
  }
49925
- __pyx_t_3 = PyString_Check(__pyx_v_arg);
49915
+ __pyx_t_2 = PyInt_Check(__pyx_v_arg);
49916
+ __pyx_t_4 = (__pyx_t_2 != 0);
49917
+ if (!__pyx_t_4) {
49918
+ } else {
49919
+ __pyx_t_3 = __pyx_t_4;
49920
+ goto __pyx_L13_bool_binop_done;
49921
+ }
49922
+ __pyx_t_4 = PyLong_Check(__pyx_v_arg);
49923
+ __pyx_t_2 = (__pyx_t_4 != 0);
49924
+ __pyx_t_3 = __pyx_t_2;
49925
+ __pyx_L13_bool_binop_done:;
49926
49926
  __pyx_t_2 = (__pyx_t_3 != 0);
49927
49927
  if (__pyx_t_2) {
49928
- if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_str, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(0, 4289, __pyx_L1_error)
49928
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_ImGuiID, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(0, 4289, __pyx_L1_error)
49929
49929
  goto __pyx_L10_break;
49930
49930
  }
49931
49931
  if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(0, 4289, __pyx_L1_error)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meltygui-imgui
3
- Version: 2.0.0.post1
3
+ Version: 2.0.0.post3
4
4
  Summary: Cython-based Python bindings for dear meltygui_imgui
5
5
  Home-page: https://github.com/Attentio-AI/meltygui-imgui
6
6
  Author: Michał Jaworski
@@ -8,12 +8,15 @@ Author-email: swistakm@gmail.com
8
8
  License: BSD
9
9
  Classifier: Intended Audience :: Developers
10
10
  Classifier: License :: OSI Approved :: BSD License
11
+ Classifier: Programming Language :: Python :: 3.11
11
12
  Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Python :: 3.13
12
14
  Classifier: Programming Language :: Python :: Implementation :: CPython
13
15
  Classifier: Programming Language :: Cython
14
16
  Classifier: Operating System :: POSIX :: Linux
17
+ Classifier: Operating System :: Microsoft :: Windows
15
18
  Classifier: Topic :: Games/Entertainment
16
- Requires-Python: >=3.12,<3.13
19
+ Requires-Python: >=3.11,<3.14
17
20
  Description-Content-Type: text/markdown
18
21
  License-File: LICENSE
19
22
  License-File: LICENSES/imgui-MIT.txt
@@ -42,14 +45,14 @@ Requires-Dist: PyOpenGL; extra == "pyglet"
42
45
  Requires-Dist: pyglet; sys_platform != "darwin" and extra == "pyglet"
43
46
  Requires-Dist: pyglet>=1.5.6; sys_platform == "darwin" and extra == "pyglet"
44
47
  Provides-Extra: full
45
- Requires-Dist: PySDL2; extra == "full"
46
- Requires-Dist: Cython<0.30,>=0.24; extra == "full"
47
- Requires-Dist: glfw; extra == "full"
48
- Requires-Dist: cocos2d; extra == "full"
49
- Requires-Dist: pygame; extra == "full"
50
48
  Requires-Dist: PyOpenGL; extra == "full"
49
+ Requires-Dist: pygame; extra == "full"
50
+ Requires-Dist: glfw; extra == "full"
51
51
  Requires-Dist: pyglet>=1.5.6; sys_platform == "darwin" and extra == "full"
52
+ Requires-Dist: cocos2d; extra == "full"
53
+ Requires-Dist: PySDL2; extra == "full"
52
54
  Requires-Dist: pyglet; sys_platform != "darwin" and extra == "full"
55
+ Requires-Dist: Cython<0.30,>=0.24; extra == "full"
53
56
  Dynamic: author
54
57
  Dynamic: author-email
55
58
  Dynamic: classifier
@@ -76,9 +79,20 @@ uv pip install meltygui-imgui
76
79
  import meltygui_imgui
77
80
  ```
78
81
 
79
- The first release is **2.0.0.post1**, supporting Linux x86-64, CPython 3.12 and
80
- glibc 2.28 or newer. It installs `meltygui_imgui` without overwriting the upstream
81
- `imgui` package. Other platforms and Python versions are not supported yet.
82
+ The current release is **2.0.0.post3**, with wheels for Linux x86-64 (glibc 2.28
83
+ or newer) and Windows x86-64 on CPython 3.11, 3.12 and 3.13. It installs `meltygui_imgui` without
84
+ overwriting the upstream `imgui` package. The 3.13 wheel is generated with
85
+ Cython 3.2; 3.11 and 3.12 keep the Cython 0.29 bindings.
86
+
87
+ ### When no wheel matches
88
+
89
+ On any other platform or Python, pip and uv fall back to the source archive
90
+ without saying that no wheel matched. The build prints a banner naming your
91
+ platform and the prebuilt targets (installers show it with `-v`, or when the
92
+ build fails). A source build needs a C++ compiler and takes a few minutes. uv
93
+ ignores the upper Python bound, so on a newer Python it also builds from
94
+ source; pip refuses instead. Pass `--only-binary meltygui-imgui` to make a
95
+ missing wheel an error rather than a compilation.
82
96
 
83
97
  The bundled Dear ImGui and font-helper license notices are included in the artifacts.
84
98
 
@@ -96,10 +110,20 @@ uvx --from twine==7.0.0 twine check --strict dist/*.whl dist/*.tar.gz
96
110
 
97
111
  Use `--sudo-docker` if Docker requires sudo. Source builds require a C++ compiler.
98
112
 
113
+ The Windows wheels are built on Windows from that same source archive. With the
114
+ MSVC build tools and uv installed, and the archive from `tools/build.py` in `dist`:
115
+
116
+ ```sh
117
+ python tools/build_windows.py
118
+ python tools/verify.py dist --platform windows
119
+ ```
120
+
121
+ delvewheel bundles the MSVC C++ runtime, so the wheels need no redistributable.
122
+
99
123
  ## Publish
100
124
 
101
125
  Pushes to `main` and pull requests build and test without uploading. A `v*` tag
102
- or a manual run with `publish=true` publishes the verified wheel and source
126
+ or a manual run with `publish=true` publishes the verified Linux and Windows wheels and the source
103
127
  archive through PyPI trusted publishing. Published versions cannot be replaced.
104
128
 
105
129
  Configure a pending GitHub publisher at https://pypi.org/manage/account/publishing/:
@@ -112,7 +136,7 @@ Configure a pending GitHub publisher at https://pypi.org/manage/account/publishi
112
136
  | Workflow | `release.yml` |
113
137
  | Environment | `pypi` |
114
138
 
115
- Then, after the main-branch build passes, create and push `v2.0.0.post1`.
139
+ Then, after the main-branch build passes, create and push `v2.0.0.post3`.
116
140
  No API token belongs in this repository.
117
141
 
118
142
  ## Licenses and changes
@@ -100,5 +100,6 @@ tests/test_graphics_mem_safety.py
100
100
  tests/test_gui_style_initialization.py
101
101
  tools/build.py
102
102
  tools/build_in_container.sh
103
+ tools/build_windows.py
103
104
  tools/smoke.py
104
105
  tools/verify.py
@@ -0,0 +1,6 @@
1
+ [build-system]
2
+ # Cython 0.29 cannot target CPython 3.13; the validated 3.11/3.12 bindings keep it.
3
+ requires = ["Cython==0.29.37; python_version < '3.13'", "Cython==3.2.4; python_version >= '3.13'",
4
+ "PyOpenGL==3.1.10", "glfw==2.10.0",
5
+ "wheel==0.45.1", "click==8.1.8", "setuptools==80.9.0"]
6
+ build-backend = "setuptools.build_meta"
@@ -26,6 +26,23 @@ if _CYTHONIZE_WITH_COVERAGE and not USE_CYTHON:
26
26
  )
27
27
 
28
28
 
29
+ PREBUILT_WHEELS = "Linux x86-64 (glibc 2.28+) and Windows x86-64, CPython 3.11, 3.12 and 3.13"
30
+ COMPILING_COMMANDS = {"bdist_wheel", "build_ext", "build", "install", "develop", "editable_wheel"}
31
+
32
+ # Installers run this file only when no prebuilt wheel matches: say so.
33
+ # Release builds set MELTYGUI_IMGUI_RELEASE_BUILD=1 to stay quiet.
34
+ if COMPILING_COMMANDS.intersection(sys.argv) and not os.environ.get("MELTYGUI_IMGUI_RELEASE_BUILD"):
35
+ import platform
36
+ print("""{rule}
37
+ meltygui-imgui: no prebuilt wheel matches this platform
38
+ this platform: {system} {machine}, {implementation} {version}
39
+ prebuilt wheels: {prebuilt}
40
+ Compiling from source instead (a few minutes). This needs a C++ compiler.
41
+ {rule}""".format(rule="*" * 72, system=platform.system(), machine=platform.machine(),
42
+ implementation=platform.python_implementation(), version=platform.python_version(),
43
+ prebuilt=PREBUILT_WHEELS), file=sys.stderr, flush=True)
44
+
45
+
29
46
  def read(filename):
30
47
  with open(filename, 'r') as file_handle:
31
48
  return file_handle.read()
@@ -76,6 +93,14 @@ else:
76
93
  cythonize_opts = {}
77
94
  general_macros = []
78
95
 
96
+ if USE_CYTHON:
97
+ import Cython
98
+ if int(Cython.__version__.split('.')[0]) >= 3:
99
+ # The bindings predate Cython 3: keep its callbacks' implicit noexcept
100
+ # and the Python 2 style semantics they were written against.
101
+ compiler_directives['legacy_implicit_noexcept'] = True
102
+ compiler_directives['language_level'] = 2
103
+
79
104
 
80
105
  def extension_sources(path):
81
106
  sources = ["{0}{1}".format(path, '.pyx' if USE_CYTHON else '.cpp')]
@@ -149,8 +174,8 @@ EXTENSIONS = [
149
174
 
150
175
  setup(
151
176
  name="meltygui-imgui",
152
- version="2.0.0.post1",
153
- python_requires=">=3.12,<3.13",
177
+ version="2.0.0.post3",
178
+ python_requires=">=3.11,<3.14",
154
179
  packages=find_packages('.'),
155
180
 
156
181
  author=u'Michał Jaworski',
@@ -175,12 +200,15 @@ setup(
175
200
  'Intended Audience :: Developers',
176
201
  'License :: OSI Approved :: BSD License',
177
202
 
203
+ 'Programming Language :: Python :: 3.11',
178
204
  'Programming Language :: Python :: 3.12',
205
+ 'Programming Language :: Python :: 3.13',
179
206
 
180
207
  'Programming Language :: Python :: Implementation :: CPython',
181
208
  'Programming Language :: Cython',
182
209
 
183
210
  'Operating System :: POSIX :: Linux',
211
+ 'Operating System :: Microsoft :: Windows',
184
212
 
185
213
  'Topic :: Games/Entertainment',
186
214
  ],
@@ -1,4 +1,4 @@
1
- """Build the checked-out sources as a Linux x86-64 / CPython 3.12 wheel and sdist."""
1
+ """Build the checked-out sources as Linux x86-64 wheels (one per supported CPython) and an sdist."""
2
2
  import argparse
3
3
  import hashlib
4
4
  import json
@@ -10,6 +10,8 @@ import tempfile
10
10
 
11
11
  ROOT = Path(__file__).resolve().parents[1]
12
12
  KIND = "imgui"
13
+ # manylinux interpreter tags; keep in step with python_requires and tools/verify.py.
14
+ PYTHONS = ["cp311", "cp312", "cp313"]
13
15
  IMAGE = "quay.io/pypa/manylinux_2_28_x86_64@sha256:531d7aa844bbb0c131d4ab011d3db741c4abc8d498cd5ccc86121046f62303b4"
14
16
 
15
17
 
@@ -36,11 +38,11 @@ def main():
36
38
  "-v", f"{ROOT / 'tools'}:/tools:ro"]
37
39
  if args.cuda_root:
38
40
  command += ["-v", f"{args.cuda_root.resolve()}:/usr/local/cuda-12.1:ro"]
39
- subprocess.run([*command, IMAGE, "bash", "/tools/build_in_container.sh", KIND], check=True)
41
+ subprocess.run([*command, IMAGE, "bash", "/tools/build_in_container.sh", KIND, *PYTHONS], check=True)
40
42
  artifacts = [*output.glob("*.whl"), *output.glob("*.tar.gz")]
41
43
  revision = subprocess.run(["git", "-C", str(ROOT), "rev-parse", "HEAD"], capture_output=True, text=True)
42
44
  receipt = {"kind": KIND, "upstream": json.loads((ROOT / "UPSTREAM.json").read_text()),
43
- "build_image": IMAGE, "python": "CPython 3.12", "target": "manylinux_2_28_x86_64",
45
+ "build_image": IMAGE, "python": PYTHONS, "target": "manylinux_2_28_x86_64",
44
46
  "revision": revision.stdout.strip() or None,
45
47
  "sha256": {p.name: hashlib.sha256(p.read_bytes()).hexdigest() for p in artifacts}}
46
48
  (output / "build.json").write_text(json.dumps(receipt, indent=2) + "\n")
@@ -0,0 +1,32 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ kind=$1
4
+ shift
5
+ pythons=("$@")
6
+ mkdir -p "$HOME"
7
+ export PATH=/opt/python/cp312-cp312/bin:$PATH
8
+ python -m venv /tmp/build-env
9
+ export PATH=/tmp/build-env/bin:$PATH
10
+ python -m pip install -q uv==0.11.19 auditwheel==6.4.2 patchelf==0.17.2.4
11
+ # The release build is the one compilation that is not a missing-wheel fallback.
12
+ export MELTYGUI_PYCUDA_RELEASE_BUILD=1 MELTYGUI_IMGUI_RELEASE_BUILD=1
13
+ if [ "$kind" = pycuda ]; then
14
+ export CUDA_ROOT=/usr/local/cuda-12.1
15
+ export PATH=$CUDA_ROOT/bin:$PATH
16
+ export LD_LIBRARY_PATH=$CUDA_ROOT/lib64
17
+ fi
18
+ uv build --sdist --python /opt/python/cp312-cp312/bin/python /source --out-dir /output/raw
19
+ # Every wheel is built from the source archive users fall back to.
20
+ mkdir /tmp/sdist
21
+ tar -xzf /output/raw/*.tar.gz -C /tmp/sdist --strip-components=1
22
+ for tag in "${pythons[@]}"; do
23
+ uv build --wheel --python "/opt/python/$tag-$tag/bin/python" /tmp/sdist --out-dir /output/raw
24
+ done
25
+ for wheel in /output/raw/*.whl; do
26
+ auditwheel repair --plat manylinux_2_28_x86_64 --exclude libcuda.so.1 --wheel-dir /output "$wheel"
27
+ done
28
+ cp /output/raw/*.tar.gz /output/
29
+ : > /output/auditwheel.txt
30
+ for wheel in /output/*.whl; do
31
+ auditwheel show "$wheel" >> /output/auditwheel.txt
32
+ done
@@ -0,0 +1,59 @@
1
+ """Build Windows x86-64 wheels (one per supported CPython) from the release source archive."""
2
+ import argparse
3
+ import hashlib
4
+ import json
5
+ import os
6
+ from pathlib import Path
7
+ import subprocess
8
+ import tarfile
9
+ import tempfile
10
+ import zipfile
11
+
12
+ from build import KIND, PYTHONS, ROOT
13
+
14
+ # Bundles the MSVC C++ runtime (msvcp140.dll), which CPython does not ship.
15
+ DELVEWHEEL = "delvewheel==1.13.1"
16
+ TARGET = "win_amd64"
17
+
18
+
19
+ def main():
20
+ parser = argparse.ArgumentParser(description=__doc__)
21
+ parser.add_argument("--output", type=Path, default=ROOT / "dist",
22
+ help="Directory holding the sdist from tools/build.py; the wheels land beside it")
23
+ args = parser.parse_args()
24
+ output = args.output.resolve()
25
+ archives = list(output.glob("*.tar.gz"))
26
+ if len(archives) != 1:
27
+ parser.error("Expected exactly one sdist from tools/build.py in the output directory")
28
+ if any(output.glob(f"*-{TARGET}.whl")):
29
+ parser.error("Use an output directory without existing Windows wheels")
30
+ # The release build is the one compilation that is not a missing-wheel fallback.
31
+ environment = {**os.environ, f"MELTYGUI_{KIND.upper()}_RELEASE_BUILD": "1"}
32
+ with tempfile.TemporaryDirectory(prefix="meltygui-native-") as work:
33
+ # Every wheel is built from the source archive users fall back to.
34
+ with tarfile.open(archives[0]) as archive:
35
+ archive.extractall(work, filter="data")
36
+ source = next(Path(work).iterdir())
37
+ raw = Path(work) / "raw"
38
+ for tag in PYTHONS:
39
+ version = f"{tag[2]}.{tag[3:]}"
40
+ subprocess.run(["uv", "build", "--wheel", "--python", version, str(source), "--out-dir", str(raw)],
41
+ check=True, env=environment)
42
+ for wheel in sorted(raw.glob("*.whl")):
43
+ subprocess.run(["uvx", "--from", DELVEWHEEL, "delvewheel", "repair", "--wheel-dir", str(output),
44
+ str(wheel)], check=True)
45
+ wheels = sorted(output.glob(f"*-{TARGET}.whl"))
46
+ # The auditwheel.txt counterpart: the DLLs each repaired wheel carries.
47
+ report = []
48
+ for wheel in wheels:
49
+ with zipfile.ZipFile(wheel) as archive:
50
+ bundled = sorted(Path(n).name for n in archive.namelist() if ".libs/" in n and n.lower().endswith(".dll"))
51
+ report.append(f"{wheel.name}\n" + "".join(f" bundles {name}\n" for name in bundled))
52
+ (output / "delvewheel.txt").write_text("\n".join(report))
53
+ receipt = {"kind": KIND, "sdist": archives[0].name, "repair": DELVEWHEEL, "python": PYTHONS, "target": TARGET,
54
+ "sha256": {p.name: hashlib.sha256(p.read_bytes()).hexdigest() for p in [archives[0], *wheels]}}
55
+ (output / "build-windows.json").write_text(json.dumps(receipt, indent=2) + "\n")
56
+
57
+
58
+ if __name__ == "__main__":
59
+ main()
@@ -4,7 +4,7 @@ import importlib.util
4
4
 
5
5
  import meltygui_imgui as imgui
6
6
 
7
- assert importlib.metadata.version('meltygui-imgui') == '2.0.0.post1'
7
+ assert importlib.metadata.version('meltygui-imgui') == '2.0.0.post3'
8
8
  assert importlib.util.find_spec('imgui') is None
9
9
  context = imgui.create_context()
10
10
  try:
@@ -1,4 +1,4 @@
1
- """Verify the two release artifacts, package boundary, and included license notices."""
1
+ """Verify the release artifacts (a wheel per CPython and the sdist), package boundary, and included license notices."""
2
2
  from email.parser import BytesParser
3
3
  from pathlib import Path
4
4
  import argparse
@@ -7,44 +7,63 @@ import tarfile
7
7
  import zipfile
8
8
 
9
9
  KIND = "imgui"
10
- VERSION = "2.0.0.post1"
10
+ VERSION = "2.0.0.post3"
11
+ PYTHONS = ["cp311", "cp312", "cp313"]
11
12
  NAMESPACE = "meltygui_" + KIND
13
+ # platform -> (wheel platform tag prefix, extension module suffix)
14
+ PLATFORMS = {"linux": ("manylinux", ".so"), "windows": ("win_amd64", ".pyd")}
12
15
 
13
16
 
14
- def main():
15
- parser = argparse.ArgumentParser(description=__doc__)
16
- parser.add_argument("directory", type=Path, nargs="?", default=Path("dist"))
17
- args = parser.parse_args()
18
- ref = os.environ.get("GITHUB_REF", "")
19
- if ref.startswith("refs/tags/"):
20
- assert ref == "refs/tags/v" + VERSION, "Tag must match the package version"
21
- wheels = list(args.directory.glob("*.whl"))
22
- archives = list(args.directory.glob("*.tar.gz"))
23
- assert len(wheels) == len(archives) == 1, "Expected exactly one wheel and one sdist"
24
- wheel = wheels[0]
25
- assert "cp312-cp312-manylinux" in wheel.name
17
+ def verify_wheel(wheel, platform):
18
+ tag, extension = PLATFORMS[platform]
19
+ assert f"-{wheel.name.split('-')[2]}-{tag}" in wheel.name
26
20
  with zipfile.ZipFile(wheel) as archive:
27
21
  names = archive.namelist()
28
22
  metadata = BytesParser().parsebytes(archive.read(next(n for n in names if n.endswith(".dist-info/METADATA"))))
29
23
  assert metadata["Name"].replace("_", "-") == "meltygui-" + KIND
30
24
  assert metadata["Version"] == VERSION
31
- assert "3.12" in metadata["Requires-Python"] and "3.13" in metadata["Requires-Python"]
25
+ assert "3.11" in metadata["Requires-Python"] and "3.14" in metadata["Requires-Python"]
32
26
  assert metadata["Home-page"] == "https://github.com/Attentio-AI/meltygui-" + KIND
33
27
  assert any(n.startswith(NAMESPACE + "/") for n in names)
34
28
  assert not any(n.startswith(KIND + "/") for n in names), "Must not overwrite upstream package"
35
- assert any(n.endswith(".so") for n in names)
29
+ assert any(n.endswith(extension) for n in names)
30
+ if platform == "windows":
31
+ # CPython ships vcruntime140 but not the C++ runtime the extension links.
32
+ assert any(".libs/msvcp140" in n for n in names)
36
33
  assert any("/licenses/LICENSE" in n for n in names)
37
34
  assert not any(n.startswith(("meltygui/", "meltygui_pro/", "meltyprivate/")) for n in names)
38
35
  if KIND == "pycuda":
36
+ assert any(d.startswith("numpy") for d in metadata.get_all("Requires-Dist", []))
39
37
  assert any("NVIDIA-CUDA-12.1-EULA" in n for n in names)
40
38
  assert any("libcurand" in n for n in names)
41
39
  assert not any(Path(n).name.startswith("libcuda.so") for n in names)
40
+ return metadata
41
+
42
+
43
+ def main():
44
+ parser = argparse.ArgumentParser(description=__doc__)
45
+ parser.add_argument("directory", type=Path, nargs="?", default=Path("dist"))
46
+ parser.add_argument("--platform", choices=sorted(PLATFORMS), nargs="+", default=["linux"],
47
+ help="Platforms whose wheels the directory must hold")
48
+ args = parser.parse_args()
49
+ ref = os.environ.get("GITHUB_REF", "")
50
+ if ref.startswith("refs/tags/"):
51
+ assert ref == "refs/tags/v" + VERSION, "Tag must match the package version"
52
+ wheels = list(args.directory.glob("*.whl"))
53
+ archives = list(args.directory.glob("*.tar.gz"))
54
+ assert len(archives) == 1, "Expected exactly one sdist"
55
+ platform_of = {w: next((p for p, (tag, _) in PLATFORMS.items() if f"-{tag}" in w.name), "") for w in wheels}
56
+ expected = sorted((platform, tag) for platform in args.platform for tag in PYTHONS)
57
+ assert sorted((platform_of[w], w.name.split("-")[2]) for w in wheels) == expected, \
58
+ "Expected one wheel per supported CPython and platform"
59
+ for wheel in wheels:
60
+ metadata = verify_wheel(wheel, platform_of[wheel])
42
61
  with tarfile.open(archives[0]) as archive:
43
62
  names = archive.getnames()
44
63
  assert any(n.endswith("/UPSTREAM.json") for n in names)
45
64
  assert any(n.endswith("/LICENSE") for n in names)
46
65
  assert any("/" + NAMESPACE + "/" in n for n in names)
47
- print(f"Verified {metadata['Name']} {VERSION}: wheel, sdist, namespace and licenses")
66
+ print(f"Verified {metadata['Name']} {VERSION} for {', '.join(args.platform)}: wheels, sdist, namespace and licenses")
48
67
 
49
68
 
50
69
  if __name__ == "__main__":
@@ -1,4 +0,0 @@
1
- [build-system]
2
- requires = ["Cython==0.29.37", "PyOpenGL==3.1.10", "glfw==2.10.0",
3
- "wheel==0.45.1", "click==8.1.8", "setuptools==80.9.0"]
4
- build-backend = "setuptools.build_meta"
@@ -1,21 +0,0 @@
1
- #!/bin/bash
2
- set -euo pipefail
3
- kind=$1
4
- mkdir -p "$HOME"
5
- export PATH=/opt/python/cp312-cp312/bin:$PATH
6
- python -m venv /tmp/build-env
7
- export PATH=/tmp/build-env/bin:$PATH
8
- python -m pip install -q uv==0.11.19 auditwheel==6.4.2 patchelf==0.17.2.4
9
- if [ "$kind" = pycuda ]; then
10
- export CUDA_ROOT=/usr/local/cuda-12.1
11
- export PATH=$CUDA_ROOT/bin:$PATH
12
- export LD_LIBRARY_PATH=$CUDA_ROOT/lib64
13
- fi
14
- uv build --python /opt/python/cp312-cp312/bin/python /source --out-dir /output/raw
15
- for wheel in /output/raw/*.whl; do
16
- auditwheel repair --plat manylinux_2_28_x86_64 --exclude libcuda.so.1 --wheel-dir /output "$wheel"
17
- done
18
- cp /output/raw/*.tar.gz /output/
19
- for wheel in /output/*.whl; do
20
- auditwheel show "$wheel" > /output/auditwheel.txt
21
- done
@@ -10,12 +10,12 @@ cocos2d
10
10
  pyglet>=1.5.6
11
11
 
12
12
  [full]
13
- PySDL2
14
- Cython<0.30,>=0.24
13
+ PyOpenGL
14
+ pygame
15
15
  glfw
16
16
  cocos2d
17
- pygame
18
- PyOpenGL
17
+ PySDL2
18
+ Cython<0.30,>=0.24
19
19
 
20
20
  [full:sys_platform != "darwin"]
21
21
  pyglet