Expose Kindred Create version to Python at build time #28
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Make the Kindred Create version (e.g.
0.1.3) available to Python code at runtime.Implementation
src/Mod/Create/version.py.inas a CMake template containingVERSION = "@KINDRED_CREATE_VERSION@"configure_file()insrc/Mod/Create/CMakeLists.txtto generateversion.pyfrom the template at build timeversion.pyalongsideInit.pyandInitGui.pyinMod/Create/from version import VERSIONin any Create module Python codeFiles
src/Mod/Create/version.py.in(new)src/Mod/Create/CMakeLists.txt(modify)