Modern Python Support
Author: DeMENIGECOCreated Jul 3, 2026Updated Jul 7, 2026
Migrate the build system to pyproject.toml
Summary
The current build system still relies on setup.py and legacy packaging APIs, which have caused compatibility issues with recent Python releases (e.g. distutils removal).
It might be a good time to modernize the packaging configuration by migrating to pyproject.toml.
Suggested structure
pyproject.toml
MANIFEST.in
src_c/
src_py/Example MANIFEST.in:
recursive-include src_c *
recursive-include src_py *Benefits
- Use the modern Python packaging standard (PEP 517/518).
- Reduce dependence on legacy APIs.
- Improve compatibility with future Python versions.
- Simplify package building and maintenance.
- Make the project easier to maintain over time.
Notes
I understand this is a larger refactor and is independent of the fixes in PR #4538. This issue is only intended as a proposal for future development.
Source: pygame/pygame