Skip to content

build: support flit-core 4 by migrating metadata to PEP 621 - #42

Open
stanislavlevin wants to merge 1 commit into
DelineaXPM:mainfrom
stanislavlevin:flit_4
Open

build: support flit-core 4 by migrating metadata to PEP 621#42
stanislavlevin wants to merge 1 commit into
DelineaXPM:mainfrom
stanislavlevin:flit_4

Conversation

@stanislavlevin

Copy link
Copy Markdown

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:

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 <noreply@anthropic.com>
Signed-off-by: Stanislav Levin <slev@altlinux.org>
@snyk-io

snyk-io Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant