reno/doc/source/user/setuptools.rst
melissaml f95ed0e61e update the oudated URL in doc
Change-Id: Icc49ddbaafd17f9accee5161f295ced028e8438c
2018-09-23 17:44:29 +08:00

1.5 KiB

Python Packaging Integration

reno supports integration with setuptools and setuptools derivatives like pbr through a custom command - build_reno.

Using setuptools integration

To enable the build_reno command, you simply need to install reno. Once done, simply run:

python setup.py build_reno

You can configure the command in setup.py or setup.cfg. To configure it from setup.py, add a build_reno section to command_options like so:

from setuptools import setup

setup(
    name='mypackage',
    version='0.1',
    ...
    command_options={
        'build_reno': {
            'output_file': ('setup.py', 'RELEASENOTES.txt'),
        },
    },
)

To configure the command from setup.cfg, add a build_reno section. For example:

[build_reno]
output-file = RELEASENOTES.txt

Options for setuptools integration

These options related to the setuptools integration only. For general configuration of reno, refer to configuration.

repo-root

The root directory of the Git repository; defaults to .

rel-notes-dir

The parent directory; defaults to releasenotes

output-file

The filename of the release notes file; defaults to RELEASENOTES.rst