Expose Kindred Create version to Python at build time #28

Closed
opened 2026-02-08 16:20:00 +00:00 by forbes · 0 comments
Owner

Goal

Make the Kindred Create version (e.g. 0.1.3) available to Python code at runtime.

Implementation

  • Add src/Mod/Create/version.py.in as a CMake template containing VERSION = "@KINDRED_CREATE_VERSION@"
  • Add configure_file() in src/Mod/Create/CMakeLists.txt to generate version.py from the template at build time
  • Install the generated version.py alongside Init.py and InitGui.py in Mod/Create/
  • Usage: from version import VERSION in any Create module Python code

Files

  • src/Mod/Create/version.py.in (new)
  • src/Mod/Create/CMakeLists.txt (modify)
## Goal Make the Kindred Create version (e.g. `0.1.3`) available to Python code at runtime. ## Implementation - Add `src/Mod/Create/version.py.in` as a CMake template containing `VERSION = "@KINDRED_CREATE_VERSION@"` - Add `configure_file()` in `src/Mod/Create/CMakeLists.txt` to generate `version.py` from the template at build time - Install the generated `version.py` alongside `Init.py` and `InitGui.py` in `Mod/Create/` - Usage: `from version import VERSION` in any Create module Python code ## Files - `src/Mod/Create/version.py.in` (new) - `src/Mod/Create/CMakeLists.txt` (modify)
forbes referenced this issue from a commit 2026-02-14 16:31:26 +00:00
forbes referenced this issue from a commit 2026-02-14 16:34:29 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kindred/create#28