Skip to content

Add recipe for dearpygui and dependencies#32679

Open
julian-belina wants to merge 25 commits intoconda-forge:mainfrom
julian-belina:add-dearpygui
Open

Add recipe for dearpygui and dependencies#32679
julian-belina wants to merge 25 commits intoconda-forge:mainfrom
julian-belina:add-dearpygui

Conversation

@julian-belina
Copy link
Copy Markdown
Contributor

Summary

  • Adds conda-forge recipe for dearpygui, a modern, fast and powerful GUI framework for Python based on Dear ImGui.
  • C++ build with CMake, platform-specific dependencies for OpenGL/GLFW.

Checklist

  • Title of this PR is meaningful
  • License file is packaged
  • Source is from official source
  • Package does not vendor other packages
  • Build number is 0
  • A tarball (url) rather than a repo is used

🤖 Generated with Claude Code

julian-belina and others added 2 commits March 21, 2026 02:40
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
@conda-forge-admin
Copy link
Copy Markdown
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipes/dearpygui/recipe.yaml) and found some lint.

Here's what I've got...

For recipes/dearpygui/recipe.yaml:

  • ❌ Non noarch packages should have python requirement without any version constraints.
  • ❌ Non noarch packages should have python requirement without any version constraints.
  • ❌ This recipe is using a compiler, which now requires adding a build dependence on ${{ stdlib("c") }} as well. Note that this rule applies to each output of the recipe using a compiler.

This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/23369342050. Examine the logs at this URL for more detail.

@github-actions
Copy link
Copy Markdown
Contributor

Hi! This is the staged-recipes linter and your PR looks excellent! 🚀

@conda-forge-admin
Copy link
Copy Markdown
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipes/dearpygui/recipe.yaml) and found it was in an excellent condition.

julian-belina and others added 2 commits March 21, 2026 02:52
- Add build.sh and bld.bat to properly invoke CMake with conda
  compiler environment variables (CMAKE_ARGS)
- Add make (unix) and ninja (win) build dependencies
- Add API availability test (headless-safe, no display needed)
- Full GUI tests cannot run headless (upstream CI has them disabled too)

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@conda-forge-admin
Copy link
Copy Markdown
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipes/dearpygui/recipe.yaml) and found it was in an excellent condition.

I do have some suggestions for making it better though...

For recipes/dearpygui/recipe.yaml:

  • ℹ️ Found bld.bat in recipe directory, but this is a recipe v1 (rattler-build recipe). rattler-build uses build.bat instead of bld.bat for Windows builds. Consider renaming bld.bat to build.bat.

This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/23369710579. Examine the logs at this URL for more detail.

@conda-forge-admin
Copy link
Copy Markdown
Contributor

conda-forge-admin commented Mar 21, 2026

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipes/imguifiledialog/recipe.yaml, recipes/dearpygui/recipe.yaml, recipes/imnodes/recipe.yaml, recipes/imgui-docking/recipe.yaml, recipes/implot-docking/recipe.yaml) and found it was in an excellent condition.

julian-belina and others added 6 commits March 21, 2026 03:17
The GitHub tarball does not include git submodules. Added separate
source entries for glfw, imgui, implot, and freetype at the exact
commits pinned by v2.2.0. Removed glfw from host/run deps since
it is built from source as a CMake subdirectory. Updated license
to include all bundled libraries (MIT, Zlib, FTL).

Co-Authored-By: Claude Opus 4.6 <[email protected]>
rattler-build v1 recipe format uses target_directory, not folder.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Add xorg X11 development packages (libxrandr, libxinerama,
  libxcursor, libxi) required by GLFW on Linux
- Add CMAKE_POLICY_VERSION_MINIMUM=3.5 on Windows to handle
  vendored freetype's old CMakeLists.txt

Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Add libxcrypt to Linux host deps (provides -lcrypt needed by linker)
- Patch setup.py in both build scripts to skip its own CMake invocation,
  preventing setup.py from re-running CMake with hardcoded paths after
  our conda build already compiled everything correctly

Co-Authored-By: Claude Opus 4.6 <[email protected]>
CMake outputs to cmake-build-local/DearPyGui/ but setup.py's
package_data expects the .so/.pyd in DearPyGui/ at the source root.
Without this copy, the wheel is built without the native extension.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
The build scripts were incorrectly copying the built library to
dearpygui/ and patching out the entire build command. This failed
because setup.py packages from output/, deletes cmake-build-local
before pip install, and on Windows expects a Release/ subdirectory.

Now we patch setup.py surgically: skip cmake subprocess calls but
keep the shutil.copy that moves the library into output/dearpygui/.
On Windows, create the Release/ subdir that setup.py expects for
the Visual Studio layout (our Ninja build doesn't create it).

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@julian-belina
Copy link
Copy Markdown
Contributor Author

Hello @conda-forge/help-python-c,
This is my first Python/C recipe. I am a little unclear as to whether I have vendored a third-party package with this build, since I installed glfw, imgui, implot and freetype from a Git submodule. Does this fall under vendoring third-party packages?

If so, what other options do I have? The build process is implemented in the CMake files of DearPyGui at https://github.com/hoffstadt/DearPyGui/blob/master/src/distribution.cmake.

If this build is okay, a merge would be highly appreciated.

@traversaro
Copy link
Copy Markdown
Contributor

I am a little unclear as to whether I have vendored a third-party package with this build, since I installed glfw, imgui, implot and freetype from a Git submodule. Does this fall under vendoring third-party packages?

Yes, that is the definition of vendoring, at least in the conda-forge sense. If you embed libraries inside of the package instead of reusing the same libraries as installed by conda-forge, you are vendoring those.

If so, what other options do I have? The build process is implemented in the CMake files of DearPyGui at https://github.com/hoffstadt/DearPyGui/blob/master/src/distribution.cmake .

The typical process done for upstream projects that vendor libraries like glfw and freetype is to patch the build system source code to consume existing packages (as documented in https://www.glfw.org/docs/3.3/build_guide.html#build_link_cmake_package, for example) instead of hardcoding the source code of the dependencies inside the package itself.

@julian-belina
Copy link
Copy Markdown
Contributor Author

Thanks for the explanation. I see what I can do.

julian-belina and others added 7 commits March 21, 2026 19:38
Patch CMake build to use find_package(glfw3) on Linux/macOS and
find_package(Freetype) on Windows instead of compiling from vendored
source via add_subdirectory. This addresses conda-forge review
feedback about not vendoring third-party libraries.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
The conda-forge FindFreetype module does not create the
Freetype::Freetype imported target. Use ${FREETYPE_LIBRARIES}
and ${FREETYPE_INCLUDE_DIRS} variables instead.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
…reetype

The previous commit accidentally dropped the removal of add_subdirectory("freetype")
from the thirdparty hunk, causing the patch to fail on all platforms. This restores
the correct context while keeping the Freetype::Freetype imported target fix for
Windows linking.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Add new recipes for DearPyGui's dependencies that aren't on conda-forge
or need the imgui docking branch:

- imgui-docking: Dear ImGui v1.91.0 from the docking branch with
  platform-specific backends (DX11/Win32, Metal/GLFW, OpenGL3/GLFW)
  and freetype support on Windows
- implot-docking: ImPlot plotting library linked against imgui-docking
- imnodes: Node editor extension for Dear ImGui
- imguifiledialog: File dialog for Dear ImGui

Update dearpygui recipe to link against these system packages instead
of compiling third-party sources directly into the extension module.
This eliminates vendoring of imgui, implot, imnodes, ImGuiFileDialog,
gl3w, glfw, and freetype.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@julian-belina julian-belina changed the title Add recipe for dearpygui Add recipe for dearpygui and dependencies Mar 30, 2026
julian-belina and others added 6 commits March 30, 2026 14:15
The previous patch was generated against a different version of DearPyGui
(possibly main branch) which had different cmake_minimum_required versions,
different IMGUI_USER_CONFIG header names, and additional cmake definitions.
Regenerated the patch from the actual v2.2.0 release tarball to ensure
proper context matching. Uses surgical hunks instead of full-file
replacements to avoid BOM/encoding-related failures.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
1. Linux: imnodes v0.5 tag lacks ImNodesCol_GridLinePrimary enum that
   DearPyGui uses. Use the specific commit (d88f99...) which has it.

2. macOS: imgui-docking Metal backend linker failure - missing Obj-C
   runtime symbols. Add Foundation, CoreFoundation frameworks and objc
   library to Metal backend linking.

3. Windows: imguifiledialog (and other downstream packages) fail CMake
   configure because imgui-config.cmake calls find_dependency(Freetype)
   when built with IMGUI_FREETYPE=ON. Add freetype as explicit host
   dependency on Windows for all packages that depend on imgui-docking.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
1. Keep thirdparty/gl3w/ in sources and includes - it's a small OpenGL
   function loader used by DearPyGui's Linux platform code, not a
   vendored library.

2. Fix #include <misc/cpp/imgui_stdlib.h> → <imgui_stdlib.h> in 6
   DearPyGui source files. Our imgui-docking package installs the
   header flat in include/, not in the original misc/cpp/ subdirectory.

3. Add -framework QuartzCore to imgui-docking Metal backend linking
   for CAMetalLayer symbol on macOS.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants