from eumdac import __version__ as v

dotversion = v.split("-")[0]
dotversion = dotversion.split("rc")[0]
commaversion = dotversion.replace(".", ", ") + ", 0"

winVersionFile = open("eumdac-win-version.py", "r")
data = winVersionFile.read()
data = data.replace("@@VERSION@@", dotversion)
data = data.replace("@@COMMAVERSION@@", commaversion)
winVersionFile.close()

output = open("eumdac-win-version.py", "w")
output.write(data)
output.close()
