diff --git a/README.md b/README.md index bac4dea7..45ef4956 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,14 @@ It can be installed with pip: pip install antsibull-changelog +For python projects, `antsibull-changelog release` can retrieve the current +version from `pyproject.toml`. +You can install the project with + + pip install antsibull-changelog[toml] + +to pull in the necessary toml parser for this feature. + For more information, see the [documentation](https://github.com/ansible-community/antsibull-changelog/tree/main/docs/changelogs.rst). diff --git a/changelogs/126-toml-extra.yaml b/changelogs/126-toml-extra.yaml new file mode 100644 index 00000000..6ebb389b --- /dev/null +++ b/changelogs/126-toml-extra.yaml @@ -0,0 +1,5 @@ +--- +minor_changes: + - Add ``toml`` extra to pull in a toml parser to use to guess the version + based on ``pyproject.toml`` + (https://github.com/ansible-community/antsibull-changelog/pull/126). diff --git a/pyproject.toml b/pyproject.toml index c4df12ef..052e7b92 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,6 +53,19 @@ antsibull-changelog = "antsibull_changelog.cli:main" [project.optional-dependencies] +# +# User facing +# + +# Use for getting the current version from pyproject.toml +toml = [ + "tomli; python_version<'3.11'", +] + +# +# Development. Not user facing. +# + codeqa = [ "flake8 >= 3.8.0", "pylint",