Skip to content

Commit 7cb1b94

Browse files
authored
refactor(packaging): align pyproject.toml with PEP 621 (#13)
refactor(packaging): Align pyproject.toml with PEP 621 metadata standard This commit migrates package metadata from the `[tool.poetry]` section to the standardized `[project]` table as specified by PEP 621. Key changes: - Moves core metadata (name, version, description, authors, etc.) to the `[project]` table. - Updates the `license` definition to correctly reference a custom license file, resolving validation warnings. - Updates the `requires-python` specifier to be PEP 440 compliant, fixing a `ruff` pre-commit hook error. - Confirms the package remains buildable with standard PyPA tools (e.g., `build`) for PEP 517/518 compliance. - Retains Poetry-specific dependency tables (`[tool.poetry.dependencies]`) to ensure full compatibility with Poetry's development workflow.
1 parent 37f7e1d commit 7cb1b94

2 files changed

Lines changed: 13 additions & 8 deletions

File tree

poetry.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
1-
[tool.poetry]
1+
[project]
22
name = "my_python_project"
33
version = "0.1.0"
44
description = "A best-in-class Python package template."
5-
authors = ["CoReason, Inc. <gowtham.rao@coreason.ai>"]
5+
authors = [
6+
{name = "CoReason, Inc.", email = "gowtham.rao@coreason.ai"},
7+
]
68
readme = "README.md"
7-
license = "Prosperity-3.0.0"
8-
homepage = "https://github.com/[USERNAME]/[REPO_NAME]"
9-
repository = "https://github.com/[USERNAME]/[REPO_NAME]"
10-
documentation = "https://github.com/[USERNAME]/[REPO_NAME]"
9+
license = "LicenseRef-Proprietary"
10+
license-files = ["LICENSE"]
1111
keywords = ["template", "poetry", "python"]
1212
classifiers = [
1313
"Development Status :: 3 - Alpha",
1414
"Intended Audience :: Developers",
15-
"License :: Other/Proprietary License",
1615
"Operating System :: OS Independent",
1716
"Programming Language :: Python :: 3",
1817
"Programming Language :: Python :: 3.10",
1918
"Programming Language :: Python :: 3.11",
2019
"Programming Language :: Python :: 3.12",
2120
]
21+
requires-python = ">=3.10"
22+
23+
[project.urls]
24+
Homepage = "https://github.com/[USERNAME]/[REPO_NAME]"
25+
Repository = "https://github.com/[USERNAME]/[REPO_NAME]"
26+
Documentation = "https://github.com/[USERNAME]/[REPO_NAME]"
2227

2328
[tool.poetry.dependencies]
2429
python = "^3.10"

0 commit comments

Comments
 (0)