Skip to content

Commit 68d38f2

Browse files
authored
Merge pull request #24 from eggplants/master
Update poetry to 2.0
2 parents 6ababa1 + 094a8e7 commit 68d38f2

4 files changed

Lines changed: 65 additions & 30 deletions

File tree

.pre-commit-config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ repos:
2727
rev: v2.5.0
2828
hooks:
2929
- id: pyproject-fmt
30+
- repo: https://github.com/python-poetry/poetry
31+
rev: 2.0.0
32+
hooks:
33+
- id: poetry-check
3034
- repo: https://github.com/psf/black
3135
rev: 24.10.0
3236
hooks:

poetry.lock

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

publish.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def get_published_vesions() -> set[str]:
8585

8686
def update_package_version(version: str) -> None:
8787
updated_toml = re.sub(
88-
r'(?<=\[tool.poetry\]\nversion = ")[^"]+(?=")',
88+
r'(?<=name = "openapi-generator-cli"\nversion = ")[^"]+(?=")',
8989
version,
9090
Path("pyproject.toml").open("r").read(), # noqa: SIM115
9191
count=1,

pyproject.toml

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,51 @@
1-
# TODO: In Poetry 2.0 move into PEP 621 compatible configuration
2-
31
[build-system]
42
build-backend = "poetry.core.masonry.api"
53
requires = [
6-
"poetry-core",
4+
"poetry-core>=2",
75
]
86

9-
[tool.poetry]
7+
[project]
8+
name = "openapi-generator-cli"
109
version = "0"
10+
description = "CLI for openapi generator"
11+
readme = "README.md"
12+
keywords = [
13+
"cli",
14+
"generator",
15+
"openapi",
16+
]
17+
license = { text = "APACHE 2.0" }
1118
authors = [
12-
"OpenAPI Generator community <team@openapitools.org>",
19+
{ name = "OpenAPI Generator community", email = "team@openapitools.org" },
1320
]
21+
requires-python = ">=3.9,<4"
1422
classifiers = [
1523
"License :: OSI Approved :: Apache Software License",
1624
"Programming Language :: Python",
17-
"Programming Language :: Python :: 3",
1825
"Programming Language :: Python :: 3 :: Only",
26+
"Programming Language :: Python :: 3.9",
27+
"Programming Language :: Python :: 3.10",
28+
"Programming Language :: Python :: 3.11",
29+
"Programming Language :: Python :: 3.12",
30+
"Programming Language :: Python :: 3.13",
1931
"Programming Language :: Python :: Implementation :: CPython",
2032
"Programming Language :: Python :: Implementation :: PyPy",
33+
"Typing :: Typed",
2134
]
22-
description = "CLI for openapi generator"
23-
keywords = [
24-
"openapi",
25-
"generator",
26-
"cli",
35+
optional-dependencies.jdk4py = [
36+
"jdk4py>=21.0.4.1,<22; python_version>='3.10'",
2737
]
28-
name = "openapi-generator-cli"
38+
urls.Documentation = "https://github.com/OpenAPITools/openapi-generator#3---usage"
39+
urls.Homepage = "https://openapi-generator.tech"
40+
urls.Repository = "https://github.com/OpenAPITools/openapi-generator"
41+
scripts.openapi-generator-cli = "openapi_generator_cli:cli"
42+
43+
[tool.poetry]
44+
requires-poetry = ">=2.0"
2945
packages = [
3046
{ include = "openapi_generator_cli" },
3147
]
3248
include = [ "openapi_generator_cli/*.jar" ]
33-
license = "APACHE 2.0"
34-
readme = "README.md"
35-
homepage = "https://openapi-generator.tech"
36-
repository = "https://github.com/OpenAPITools/openapi-generator"
37-
documentation = "https://github.com/OpenAPITools/openapi-generator#3---usage"
38-
39-
[tool.poetry.dependencies]
40-
python = ">=3.9,<4"
41-
jdk4py = { version = "^21.0.4.1", optional = true, python = ">=3.10" }
4249

4350
[tool.poetry.group.dev.dependencies]
4451
mypy = ">=0.991,<1.15"
@@ -47,11 +54,8 @@ taskipy = "^1.10.3"
4754
pytest = ">=7.2.2,<9.0.0"
4855
natsort = "^8.4.0"
4956

50-
[tool.poetry.extras]
51-
jdk4py = [ "jdk4py" ]
52-
53-
[tool.poetry.scripts]
54-
openapi-generator-cli = "openapi_generator_cli:cli"
57+
[tool.poetry.requires-plugins]
58+
poetry-plugin-shell = ">=1.0"
5559

5660
[tool.black]
5761
line-length = 120

0 commit comments

Comments
 (0)