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.
Description
This PR is an extension of PR #4211 with the goal of continuing to remove deprecated libraries, simplifying the build process and bringing the Pygame build configuration into compliance with PEP-517 and PEP-632. This PR is focused on the refractor of the
setup.py
file, the introduction ofpyproject.toml
and the removal ofdisutils
fromsetup.py
. The end goal is a more simplified and intuitive build system that usespip install
as the primary build command rather than runningsetup.py install
.Changes
pyproject.toml
: This was added and metadata information and build dependencies that were previously defined insetup.py
have been moved here.pyproject.toml
file brings the build structure in line with PEP-517 allowing for build dependencies and thesetuptools
backend to be specified within.setup.cfg
: Added duplicate metadata to allow builds on Python 3.6.pip
looked for metadata within thesetup.cfg
rather than thepyproject.toml
. Duplicating the metadata was a simple fix to ensure continued support for Python 3.6.setup.py
: Refactored for organization,distutils
was removed and replaced withsetuptools
, and metadata was removed.disutils
was removed in most places in compliance with PEP-632, usages ofdistutils
have been replaced by the appropriate counterparts insetuptools
. If no appropriate counterpart was found a custom implementation of the utility was created.setup.py
file in favor of being moved topyproject.toml
andsetup.cfg
as described above.buildconfig/appveyor.yml
: Appveyor build changed to usepip
instead of callingsetup.py
directly.USE_ANALYZE
, which gets detected by thesetup.py
script similar toPYGAME_DETECT_AVX2
. This is because you cannot pass arguments to thesetup.py
when building withpip
.Tests
These changes will be tested through Appveyor to ensure that the build process works similar to PR #4211. If the Appveyor targets record successful builds with all tests passing then that will be our indication that the updated build system functions as intended and works within the legacy code base.