Phasing Out Distutils And Bringing the Build System Up To PEP 517 #4198
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With the deprecation of
distutils
in Python 3.10, my senior design team thought it would be helpful to bring pygame's build system up to the PEP 517 standards. This is still a work on progress, but we are submitting this PR to run our changes through AppVeyor and get feedback from the core development team.We opted to use a
pyproject.toml
to house the metadata while using thesetup.py
as the build backend to retain the complex build logic.The
setup.py
has been reorganized to for maintainability. Additionally, most instances ofdistutils
have been replaced by theirsetuptools
counterparts. Our goal is to reduce the length and complexity of thesetup.py
script by leveraging the encapsulation offered bysetuptools
.We removed all but 1 instance of
distutils
from thebuildconfig
module.We have also updated the AppVeyor script to use
pip wheel
instead of callingsetup.py
directly per PEP 517 standards.Overall, we want to bring the pygame build system up to date to ensure the longevity of the project. We will continue to polish out these changes to fully eliminate
distutils
. We are open to any feedback, suggestions, or questions you have about our work.