def write_release_version(version):
    """Write the release version to ``_version.py``."""
    dirname = os.path.abspath(os.path.dirname(__file__))
    f = open(os.path.join(dirname, "_version.py"), "wt")
    f.write("__version__ = '%s'\n" % version)
    f.close()