Skip to content

chore: consolidate package metadata into pyproject.toml (PEP 621) #471

@thomasc-adyen

Description

@thomasc-adyen

Context

Raised as a follow-up from PR #468.

Currently, package metadata (version, dependencies, etc.) is duplicated across setup.py and pyproject.toml, which led to the inconsistency fixed in PR #468 where pydantic>=2.0 was missing from setup.py.

Proposed Change

Consolidate all package metadata into pyproject.toml as the single source of truth, following modern Python packaging standards (PEP 621).

Steps:

  1. Move package discovery logic into pyproject.toml via a [tool.setuptools.packages.find] section
  2. Simplify setup.py to just from setuptools import setup; setup()
  3. Update build-system.requires in pyproject.toml to setuptools>=61.0.0

Example configuration:

[build-system]
requires = ["setuptools>=61.0.0", "wheel"]

[tool.setuptools.packages.find]
include = ["Adyen*"]
exclude = ["tests", "tests.*"]

Benefit

Prevents metadata from becoming out of sync in the future.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions