From b7eec315641e75e68d655b9e13c19e1adec502f3 Mon Sep 17 00:00:00 2001 From: Stanislav Levin Date: Tue, 25 Aug 2026 12:45:46 +0200 Subject: [PATCH] build: support flit-core 4 by migrating metadata to PEP 621 flit-core 4 removed the legacy `[tool.flit.metadata]` table: flit_core.config.ConfigError: The [tool.flit.metadata] table is no longer supported. Switch to the standard [project] table or require flit_core<4 to build this package. Move the metadata to the standard `[project]` table: - `dist-name` -> `name`, `author` -> `authors`, `description-file` -> `readme`, `requires` -> `dependencies` - `module = "delinea"` -> `[tool.flit.module]`, since the module name differs from the distribution name - version and summary keep coming from the module's `__version__` and docstring, now declared via `dynamic` - the license classifier becomes the SPDX expression `Apache-2.0` (PEP 639), which needs flit_core >= 3.12 - the project URL moves to `[project.urls]` Require `flit_core >=3.12,<5` instead of pinning an exact version, so a future flit-core major does not break the build again. The built metadata is unchanged apart from `License-Expression: Apache-2.0` replacing the license classifier. Docs: - https://flit.pypa.io/en/stable/history.html#version-4-0 - https://flit.pypa.io/en/stable/pyproject_toml.html#pyproject-toml-project Co-Authored-By: Claude Opus 5 Signed-off-by: Stanislav Levin --- pyproject.toml | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f6d0636..d20cdc5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,12 +1,16 @@ [build-system] -requires = ["flit_core ==3.9.0"] +requires = ["flit_core >=3.12,<5"] build-backend = "flit_core.buildapi" -[tool.flit.metadata] -module = "delinea" -author = "Delinea" +[project] +name = "python-dsv-sdk" +authors = [{name = "Delinea"}] +license = "Apache-2.0" +readme = "README.md" +requires-python = ">=3.7" +dynamic = ["version", "description"] +dependencies = ["requests >= 2.22.0"] classifiers = [ - "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", @@ -14,7 +18,9 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", ] -description-file = "README.md" -requires = ["requests >= 2.22.0"] -requires-python = ">=3.7" -dist-name = "python-dsv-sdk" + +[project.urls] +Homepage = "https://github.com/DelineaXPM/python-dsv-sdk" + +[tool.flit.module] +name = "delinea"