def write_to_version_file(filename, versions):
 os.unlink(filename)
 contents = json.dumps(versions, sort_keys=True, indent=1, separators=(',', ': '))
 with open(filename, 'w') as f:
  f.write((SHORT_VERSION_PY % contents))
 print(("set %s to '%s'" % (filename, versions['version'])))

def write_to_version_file ( filename , versions ) : os . unlink ( filename ) contents = json . dumps ( versions , sort_keys = True , indent = 1 , separators = ( ',' , ': ' ) ) with open ( filename , 'w' ) as f : f . write ( ( SHORT_VERSION_PY % contents ) ) print ( ( "set %s to '%s'" % ( filename , versions [ 'version' ] ) ) )
write the given version number to the given _version .