chore: consolidate package metadata into pyproject.toml (PEP 621)#473
chore: consolidate package metadata into pyproject.toml (PEP 621)#473erdemtuna wants to merge 8 commits intoAdyen:mainfrom
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- CodeResearch.md: file:line mapping of all 5 target files plus verified-clean files - ImplementationPlan.md: 2 phases (metadata consolidation + documentation) - Single implementation phase — all changes are tightly coupled Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Address feedback from 3-model plan review (GPT-5.4, Claude Opus, GPT-5.3-Codex): - Add explicit SC-001 validation (pip install . + pydantic import) - Add SC-003 built metadata inspection - Remove conditional on build package availability - Make SC-004 explicit (make install && make tests) - Add FR traceability tags to all criteria - Add Phase 2 dependency declaration Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- S3: Fix P3 acceptance scenario to match FR-007 (setup.py removed from version-files) - S5: Fix edge case factual error (build-system.requires doesn't apply to python setup.py install) - S4: Reword NFR 'identical metadata' to allow intentional improvements (URLs, long_description) - S1: Add pycurl exclusion assumption (requires system libcurl, tested via tox) Cross-artifact review: 3-model (GPT-5.4, Claude Opus, GPT-5.3-Codex) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Make pyproject.toml the single source of truth for all package metadata, eliminating the duplication between setup.py and pyproject.toml that caused the pydantic dependency bug (PR Adyen#468). Changes: - Simplify setup.py to minimal 2-line shim (FR-002) - Bump build-system.requires to setuptools>=61.0.0 (FR-005) - Add [project.urls] with Homepage/Repository/Issues (FR-004) - Add [tool.setuptools.packages.find] with include=["Adyen*"] (FR-003) - Update Makefile install to use pyproject.toml extras (FR-006) - Remove setup.py from release.yml version-files (FR-007) - Update lint.yml cache key to hash pyproject.toml (FR-008) Resolves Adyen#471 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Docs.md captures as-built state: what changed, why, verification approach - Update ImplementationPlan.md phase status to complete Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Artifact lifecycle: commit-and-clean — remove .paw/ from git index before final PR. Artifacts remain on disk for reference. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
There was a problem hiding this comment.
Code Review
This pull request migrates project metadata and configuration from setup.py to pyproject.toml, simplifying the setup.py file to a minimal stub. It also updates the Makefile to utilize editable installs with extras and adds .paw/ to the .gitignore file. Feedback points out that the updated install target in the Makefile omits pycurl and coveralls, which were previously included in the default installation, potentially leading to an incomplete development environment.
| @@ -1,5 +1,5 @@ | |||
| install: | |||
| @pip install requests pycurl mock coveralls ruff | |||
| @pip install -e ".[requests,test,dev]" | |||
There was a problem hiding this comment.
The updated install target is missing pycurl and coveralls, which were previously installed by default.
- pycurl: This is defined as an optional dependency in
pyproject.toml. To maintain the same development environment as before, it should be included in the extras list in thepip installcommand. - coveralls: This dependency is missing from
pyproject.tomlentirely. To align with the goal of consolidating metadata, it should be added to thetestordevextras inpyproject.tomland then included here.
If these were intentionally removed from the default installation, please disregard this, but usually make install is expected to set up a complete environment for development and testing.
@pip install -e ".[requests,pycurl,test,dev]"
There was a problem hiding this comment.
Both exclusions are intentional:
-
pycurl: Requires system-level
libcurl(libcurl4-openssl-dev) which is often not present on developer machines and causes install failures. It's adequately tested via tox's pycurl variant (tox -e py310-pycurl). Including it inmake installwould break the out-of-box dev setup on machines without libcurl. -
coveralls: Was a CI-only dependency not used in any local dev or test workflow — it's not in any
pyproject.tomlextras group and wasn't referenced in any Makefile target or CI workflow. Dropping it is intentional cleanup.
The new make install gives a complete local dev environment: editable install + requests + test deps + dev tools (ruff, pre-commit). Pycurl testing is handled by tox where the system dependency is explicitly set up.



Summary
Make
pyproject.tomlthe single source of truth for all package metadata (PEP 621), eliminating the duplication betweensetup.pyandpyproject.tomlthat caused the pydantic dependency bug (PR #468).Changes
setup.pypyproject.toml[project.urls],[tool.setuptools.packages.find], bumpsetuptools>=61.0.0Makefilepip install -e ".[requests,test,dev]"release.ymlsetup.pyfromversion-files(shim has no version to bump)lint.ymlhashFiles('**/pyproject.toml')instead ofsetup.pyMotivation
Package metadata was duplicated across
setup.pyandpyproject.toml, which caused a real bug:pydantic>=2.0was inpyproject.tomldependencies but missing fromsetup.py'sinstall_requires(fixed in #468). This consolidation prevents that entire class of sync-related bugs.Verification
make tests)make lint)pip install .correctly installs pydanticpip install -e ".[requests,test,dev]"workssetup.pycontains zero version referencess///is a no-op on files with no match)Out of Scope
VERSIONfile unchangedsetup.cfgunchangedAdyen/settings.pyunchangedtox.iniunchanged (future improvement candidate)Resolves #471