Project version is often already specified in somewhere in a a project file. For python projects, for instance, it may be setup.py, setup.cfg, pyproject.toml or version.py. The pyproject.toml standard, offers the attr: package.__version__ syntax for sourcing from a python file.
publiccodeyml should offer a similar feature. softwareVersion could be extended to be used like this:
softwareVersion:
file: pyproject.toml
search: 'version\s+=\s+"(?P<version>[^"]+)"'
Maybe something simpler that regexes can be found, IDK.