The version is set by the Script Compiler and set to the compile time.
Also I’ve just checked this again in R5: Sometimes, the version is shown as (encoded) compile time, and sometimes as ‘Unavailable’. I am unable to reliably replicate this behaviour.
Please see
on how I managed to extract the version number in Python.