making version number follow PEP396

I would like to have this to be able to generate version numbers for CI nightly builds as I plan on using this a bunch on other projects.