-
Notifications
You must be signed in to change notification settings - Fork 344
Update setuptools configuration to align with PEP 517/518 #780
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This might be jamming too much in this one commit, but I just noticed type hinting is broken for code that imports arcade and created this ticket #781. I think the fix is a one-liner in setup.py (or however pyproject.toml/setup.cfg handles stuff like this) |
I think we'd be fine to fix #781 in this, as it is solely related to the build system not including the proper file. It's a simple one line fix that needs added to I'll add it in tonight when I work on the version pinning and test it out. |
Is this ready? Or ready-ish? |
I think it's ready but I figured it would be best for you to test out building with it since I'm not 100% sure what your process was for building a release before, just to make sure everything you'd expect to still works. There should be no impact to end users, but make's the install from source and build process a little more clean. I've looked into all branching dependencies of our dependencies and ensured there are no version conflicts. As of the versions I've pinned they're all working and good to go. Pyglet is pinned to a specific range that I've determined with @einarf and everything else is pinned to an approximate matching the minor version, so it will install the latest patch version of each but not go over the minor version. |
PEP 517 and PEP 518 outline some ideals for the format of build system configuration.
This PR serves to align Arcade's build system more closely with these PEPs. From an end-user perspective there shouldn't be any noticeable difference. However this should serve to cleanup the development install process and simplify the build system. As well as help serve as an example of good standards for project setup.
The key change here is primarily using the
setup.cfg
file rather than thesetup.py
file, and switching to the pep517 package for building the wheel for distribution.To install the arcade from source after these changes, the below command can be used:
pip install -e "."
Extra package groups can be defined as desired by using:
pip install -e ".[dev, build, docs]"
With this change in order to build the wheel all that's needed(assuming the build package group was defined during install) is:
mkdir dist python -m pep517.build .
This will build the wheel and tar.gz file into the dist directory.
Another change this makes is pinning crucial dependency versions, specifically, pyglet, pillow, pymunk, numpy, pytiled_parser. They are pinned at their current latest versions which is what was previously being installed and tested with. Not having the versions of these packages does not feel safe as at any time breaking changes could be released on them and Arcade would always be installing the latest version from PyPi