Skip to content

Commit

Permalink
Add toml python extra to pull in a toml parser
Browse files Browse the repository at this point in the history
  • Loading branch information
gotmax23 committed Jul 5, 2023
1 parent 5a5f08a commit fb4685e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down
5 changes: 5 additions & 0 deletions changelogs/126-toml-extra.yaml
Original file line number Diff line number Diff line change
@@ -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).
13 changes: 13 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit fb4685e

Please sign in to comment.