

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'])))

dataset/ETHPy150Open Anaconda-Platform/chalmers/versioneer.py write_to_version_file/original