@release.command()
def prep():
    'Run all steps to prepare a release.\n\n    - Tag the commit.\n    - Build the sdist package.\n    - Generate the Markdown changelog to ``changelog.md``.\n    - Bump the version number to the next version.\n    '
    cur_version = get_version()
    subprocess.check_call(['git', 'tag', f'v{cur_version}'])
    with chdir(BASE):
        subprocess.check_call(['python', 'setup.py', 'sdist'])
    cl = changelog_as_markdown()
    with open(os.path.join(BASE, 'changelog.md'), 'w') as f:
        f.write(cl)
    version_parts = [int(n) for n in cur_version.split('.')]
    version_parts[(- 1)] += 1
    next_version = '.'.join(map(str, version_parts))
    bump_version(next_version)
Run all steps to prepare a release.

- Tag the commit.
- Build the sdist package.
- Generate the Markdown changelog to ``changelog.md``.
- Bump the version number to the next version.
@release.command()
def prep():
    'Run all steps to prepare a release.\n\n    - Tag the commit.\n    - Build the sdist package.\n    - Generate the Markdown changelog to ``changelog.md``.\n    - Bump the version number to the next version.\n    '
    cur_version = get_version()
    subprocess.check_call(['git', 'tag', f'v{cur_version}'])
    with chdir(BASE):
        subprocess.check_call(['python', 'setup.py', 'sdist'])
    cl = changelog_as_markdown()
    with open(os.path.join(BASE, 'changelog.md'), 'w') as f:
        f.write(cl)
    version_parts = [int(n) for n in cur_version.split('.')]
    version_parts[(- 1)] += 1
    next_version = '.'.join(map(str, version_parts))
    bump_version(next_version)