def write_latest_release_file():
 filename = '_latest_release.rst'
 template = ":orphan:\n\n.. Some common reStructuredText substitutions.\n\n   **This file is autogenerated!** So don't edit it by hand.\n\n   You can include this file at the top of your ``*.rst`` file with a line\n   like::\n\n     .. include:: {filename}\n\n   Then use the substitutions in this file, e.g.::\n\n     |latest_release_version|\n\n.. |latest_release_tag| replace:: {latest_tag}\n.. |latest_release_version| replace:: {latest_version}\n.. |latest_package_name_precise| replace:: {package_name_precise}\n.. |latest_package_name_trusty| replace:: {package_name_trusty}\n\n"
 open(filename, 'w').write(template.format(filename=filename, latest_tag=latest_release_tag(), latest_version=latest_release_version(), package_name_precise=latest_package_name('precise'), package_name_trusty=latest_package_name('trusty')))

def write_latest_release_file ( ) : filename = '_latest_release.rst' template = ":orphan:\n\n.. Some common reStructuredText substitutions.\n\n   **This file is autogenerated!** So don't edit it by hand.\n\n   You can include this file at the top of your ``*.rst`` file with a line\n   like::\n\n     .. include:: {filename}\n\n   Then use the substitutions in this file, e.g.::\n\n     |latest_release_version|\n\n.. |latest_release_tag| replace:: {latest_tag}\n.. |latest_release_version| replace:: {latest_version}\n.. |latest_package_name_precise| replace:: {package_name_precise}\n.. |latest_package_name_trusty| replace:: {package_name_trusty}\n\n" open ( filename , 'w' ) . write ( template . format ( filename = filename , latest_tag = latest_release_tag ( ) , latest_version = latest_release_version ( ) , package_name_precise = latest_package_name ( 'precise' ) , package_name_trusty = latest_package_name ( 'trusty' ) ) )
write a file in the doc/ dir containing restructuredtext substitutions for the latest release tag name and version number .