Skip to content

Commit

Permalink
Merge pull request #24 from eggplants/master
Browse files Browse the repository at this point in the history
Update poetry to 2.0
  • Loading branch information
wing328 authored Jan 22, 2025
2 parents 6ababa1 + 094a8e7 commit 68d38f2
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 30 deletions.
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ repos:
rev: v2.5.0
hooks:
- id: pyproject-fmt
- repo: https://github.com/python-poetry/poetry
rev: 2.0.0
hooks:
- id: poetry-check
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
Expand Down
33 changes: 30 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def get_published_vesions() -> set[str]:

def update_package_version(version: str) -> None:
updated_toml = re.sub(
r'(?<=\[tool.poetry\]\nversion = ")[^"]+(?=")',
r'(?<=name = "openapi-generator-cli"\nversion = ")[^"]+(?=")',
version,
Path("pyproject.toml").open("r").read(), # noqa: SIM115
count=1,
Expand Down
56 changes: 30 additions & 26 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,44 +1,51 @@
# TODO: In Poetry 2.0 move into PEP 621 compatible configuration

[build-system]
build-backend = "poetry.core.masonry.api"
requires = [
"poetry-core",
"poetry-core>=2",
]

[tool.poetry]
[project]
name = "openapi-generator-cli"
version = "0"
description = "CLI for openapi generator"
readme = "README.md"
keywords = [
"cli",
"generator",
"openapi",
]
license = { text = "APACHE 2.0" }
authors = [
"OpenAPI Generator community <[email protected]>",
{ name = "OpenAPI Generator community", email = "[email protected]" },
]
requires-python = ">=3.9,<4"
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Typing :: Typed",
]
description = "CLI for openapi generator"
keywords = [
"openapi",
"generator",
"cli",
optional-dependencies.jdk4py = [
"jdk4py>=21.0.4.1,<22; python_version>='3.10'",
]
name = "openapi-generator-cli"
urls.Documentation = "https://github.com/OpenAPITools/openapi-generator#3---usage"
urls.Homepage = "https://openapi-generator.tech"
urls.Repository = "https://github.com/OpenAPITools/openapi-generator"
scripts.openapi-generator-cli = "openapi_generator_cli:cli"

[tool.poetry]
requires-poetry = ">=2.0"
packages = [
{ include = "openapi_generator_cli" },
]
include = [ "openapi_generator_cli/*.jar" ]
license = "APACHE 2.0"
readme = "README.md"
homepage = "https://openapi-generator.tech"
repository = "https://github.com/OpenAPITools/openapi-generator"
documentation = "https://github.com/OpenAPITools/openapi-generator#3---usage"

[tool.poetry.dependencies]
python = ">=3.9,<4"
jdk4py = { version = "^21.0.4.1", optional = true, python = ">=3.10" }

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

[tool.poetry.extras]
jdk4py = [ "jdk4py" ]

[tool.poetry.scripts]
openapi-generator-cli = "openapi_generator_cli:cli"
[tool.poetry.requires-plugins]
poetry-plugin-shell = ">=1.0"

[tool.black]
line-length = 120
Expand Down

0 comments on commit 68d38f2

Please sign in to comment.