Skip to content

Invalid pyproject.toml config project.dynamic #22

@Gadgetoid

Description

@Gadgetoid
$ validate-pyproject pyproject.toml 
Invalid file: pyproject.toml
[ERROR] `project.dynamic[0]` must be one of ['version', 'description', 'readme', 'requires-python', 'license', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']

The dynamic entry should be:

dynamic = ["version"]

To indicate that the version is fetched dynamically at build time, and there should be some configuration to tell pyproject where to get the version number from.

I use hatchling, and something like:

...
dynamic = ["version"]
...
[tool.hatch.version]
path = "PROJECT_NAME/__init__.py"

Alternatively version should be specified explicitly in the project info.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions