Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6db8cf6

Browse files
committedJan 30, 2025
build(poetry): migrate to poetry 2.0 and follow pep 621
1 parent e6dcdbc commit 6db8cf6

File tree

2 files changed

+169
-66
lines changed

2 files changed

+169
-66
lines changed
 

‎poetry.lock

Lines changed: 95 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pyproject.toml

Lines changed: 74 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,28 @@
1-
[tool.commitizen]
2-
version = "4.1.1"
3-
tag_format = "v$version"
4-
version_files = [
5-
"pyproject.toml:version",
6-
"commitizen/__version__.py",
7-
".pre-commit-config.yaml:rev:.+Commitizen",
8-
]
9-
10-
[tool.poetry]
1+
[project]
112
name = "commitizen"
123
version = "4.1.1"
134
description = "Python commitizen client tool"
14-
authors = ["Santiago Fraire <santiwilly@gmail.com>"]
15-
license = "MIT"
16-
keywords = ["commitizen", "conventional", "commits", "git"]
5+
authors = [{ name = "Santiago Fraire", email = "santiwilly@gmail.com" }]
6+
license = { text = "LICENSE" }
177
readme = "docs/README.md"
18-
homepage = "https://github.com/commitizen-tools/commitizen"
8+
requires-python = ">=3.9,<4.0"
9+
dependencies = [
10+
"questionary (>=2.0,<3.0)",
11+
"decli (>=0.6.0,<1.0)",
12+
"colorama (>=0.4.1,<1.0)",
13+
"termcolor (>=1.1,<3)",
14+
"packaging>=19",
15+
"tomlkit (>=0.5.3,<1.0.0)",
16+
"jinja2>=2.10.3",
17+
"pyyaml>=3.08",
18+
"argcomplete >=1.12.1,<3.6",
19+
"typing-extensions (>=4.0.1,<5.0.0) ; python_version < '3.11'",
20+
"charset-normalizer (>=2.1.0,<4)",
21+
# Use the Python 3.11 and 3.12 compatible API: https://github.com/python/importlib_metadata#compatibility
22+
"importlib_metadata (>=8.0.0,<9) ; python_version < '3.10'",
23+
24+
]
25+
keywords = ["commitizen", "conventional", "commits", "git"]
1926
# See also: https://pypi.org/classifiers/
2027
classifiers = [
2128
"Development Status :: 5 - Production/Stable",
@@ -32,23 +39,60 @@ classifiers = [
3239
"Programming Language :: Python :: 3.13",
3340
"Programming Language :: Python :: Implementation :: CPython",
3441
]
35-
packages = [{ include = "commitizen" }, { include = "commitizen/py.typed" }]
3642

37-
[tool.poetry.dependencies]
38-
python = ">=3.9"
39-
questionary = "^2.0"
40-
decli = "^0.6.0"
41-
colorama = "^0.4.1"
42-
termcolor = ">= 1.1, < 3"
43-
packaging = ">=19"
44-
tomlkit = ">=0.5.3,<1.0.0"
45-
jinja2 = ">=2.10.3"
46-
pyyaml = ">=3.08"
47-
argcomplete = ">=1.12.1,<3.6"
48-
typing-extensions = { version = "^4.0.1", python = "<3.11" }
49-
charset-normalizer = ">=2.1.0,<4"
50-
# Use the Python 3.11 and 3.12 compatible API: https://github.com/python/importlib_metadata#compatibility
51-
importlib_metadata = { version = ">=8.0.0,<9", python = "<3.10" }
43+
[project.urls]
44+
Homepage = "https://github.com/commitizen-tools/commitizen"
45+
Documentation = "https://commitizen-tools.github.io/commitizen/"
46+
Repository = "https://github.com/commitizen-tools/commitizen"
47+
Issues = "https://github.com/commitizen-tools/commitizen/issues"
48+
Changelog = "https://github.com/commitizen-tools/commitizen/blob/master/CHANGELOG.md"
49+
50+
[project.scripts]
51+
cz = "commitizen.cli:main"
52+
git-cz = "commitizen.cli:main"
53+
54+
[project.entry-points."commitizen.plugin"]
55+
cz_conventional_commits = "commitizen.cz.conventional_commits:ConventionalCommitsCz"
56+
cz_jira = "commitizen.cz.jira:JiraSmartCz"
57+
cz_customize = "commitizen.cz.customize:CustomizeCommitsCz"
58+
59+
[project.entry-points."commitizen.changelog_format"]
60+
markdown = "commitizen.changelog_formats.markdown:Markdown"
61+
asciidoc = "commitizen.changelog_formats.asciidoc:AsciiDoc"
62+
textile = "commitizen.changelog_formats.textile:Textile"
63+
restructuredtext = "commitizen.changelog_formats.restructuredtext:RestructuredText"
64+
65+
[project.entry-points."commitizen.provider"]
66+
cargo = "commitizen.providers:CargoProvider"
67+
commitizen = "commitizen.providers:CommitizenProvider"
68+
composer = "commitizen.providers:ComposerProvider"
69+
npm = "commitizen.providers:NpmProvider"
70+
pep621 = "commitizen.providers:Pep621Provider"
71+
poetry = "commitizen.providers:PoetryProvider"
72+
scm = "commitizen.providers:ScmProvider"
73+
74+
[project.entry-points."commitizen.scheme"]
75+
pep440 = "commitizen.version_schemes:Pep440"
76+
semver = "commitizen.version_schemes:SemVer"
77+
semver2 = "commitizen.version_schemes:SemVer2"
78+
79+
[build-system]
80+
requires = ["poetry-core>=2.0"]
81+
build-backend = "poetry.core.masonry.api"
82+
83+
84+
[tool.commitizen]
85+
version = "4.1.1"
86+
tag_format = "v$version"
87+
version_files = [
88+
"pyproject.toml:version",
89+
"commitizen/__version__.py",
90+
".pre-commit-config.yaml:rev:.+Commitizen",
91+
]
92+
93+
94+
[tool.poetry]
95+
packages = [{ include = "commitizen" }, { include = "commitizen/py.typed" }]
5296

5397
[tool.poetry.group.dev.dependencies]
5498
# dev tool
@@ -75,35 +119,6 @@ types-python-dateutil = "^2.8.19.13"
75119
rich = "^13.7.1"
76120

77121

78-
[tool.poetry.scripts]
79-
cz = "commitizen.cli:main"
80-
git-cz = "commitizen.cli:main"
81-
82-
[tool.poetry.plugins."commitizen.plugin"]
83-
cz_conventional_commits = "commitizen.cz.conventional_commits:ConventionalCommitsCz"
84-
cz_jira = "commitizen.cz.jira:JiraSmartCz"
85-
cz_customize = "commitizen.cz.customize:CustomizeCommitsCz"
86-
87-
[tool.poetry.plugins."commitizen.changelog_format"]
88-
markdown = "commitizen.changelog_formats.markdown:Markdown"
89-
asciidoc = "commitizen.changelog_formats.asciidoc:AsciiDoc"
90-
textile = "commitizen.changelog_formats.textile:Textile"
91-
restructuredtext = "commitizen.changelog_formats.restructuredtext:RestructuredText"
92-
93-
[tool.poetry.plugins."commitizen.provider"]
94-
cargo = "commitizen.providers:CargoProvider"
95-
commitizen = "commitizen.providers:CommitizenProvider"
96-
composer = "commitizen.providers:ComposerProvider"
97-
npm = "commitizen.providers:NpmProvider"
98-
pep621 = "commitizen.providers:Pep621Provider"
99-
poetry = "commitizen.providers:PoetryProvider"
100-
scm = "commitizen.providers:ScmProvider"
101-
102-
[tool.poetry.plugins."commitizen.scheme"]
103-
pep440 = "commitizen.version_schemes:Pep440"
104-
semver = "commitizen.version_schemes:SemVer"
105-
semver2 = "commitizen.version_schemes:SemVer2"
106-
107122
[tool.coverage]
108123
[tool.coverage.report]
109124
show_missing = true
@@ -133,9 +148,6 @@ omit = [
133148
'*/tests/*',
134149
]
135150

136-
[build-system]
137-
requires = ["poetry_core>=1.0.0"]
138-
build-backend = "poetry.core.masonry.api"
139151

140152
[tool.pytest.ini_options]
141153
addopts = "--strict-markers"

0 commit comments

Comments
 (0)
Please sign in to comment.