I have a project set up with automatic versioning with setuptools_scm. I also configured it to write the version to a version file and added the file path to the .spec file for building. The version is displayed in the title of a PyQt window, but this only works properly when running it from the development environment. Somehow I cannot get it to work from inside the executable. I've tried asking Github Copilot, ChatGPT and Copilot for fixes, but nothing seems to work. What is the proper way to auto-generate version numbers from the Git tag and have it available inside an executable? Continue reading...