-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
[v2] Convert project to PEP517-based setuptools layout #6423
Conversation
This change provides the following benefits: * We support PEP517 which is the current accepted standard for building Python packages (e.g., sdist and wheel) * Our requirements our now easily parseable because they are only located in the setup.cfg. This required the following changes: * Migrating to from the setup.py to solely relying on the setup.cfg for package configuration * Minimize the setup.py to just call setuptools.setup(). This is needed to support editable installs until PEP660 is available in pip and setuptools. * Update from using requires_dist to install_requires. requires_dist is no longer really used and install_requires is the recommended configuration key going forward for declaring dependencies * Add pyproject.toml file. This is needed for PEP517 support. Currently, it uses the setuptools backend. The version floor of 40.6.0 was chosen based on it including the setup.py in the sdist by default.
The project does not support universal wheels because it does not support Python 2. The section being present was just an oversight as Python 2 was never supported by v2.
This is the currently recommended tool for following PEP517 to build sdists and wheels. The command `python setup.py bdist_wheel` is setuptools specific and does not take into account if we swap out the build backend in the pyproject.toml. Note we are building both the sdist and wheel when using the `build` CLI because that is the recommendation so that you can make sure that a wheel can be built from an sdist.
This ensures that it is using both PEP517 and the `build` CLI to build the sdist. In upgrading, some of the ignore rules had to be updated because in version 0.42, breaking changes were made so that recursive ignore of all files and directories in a particular directory required ** now instead of *.
This ensures we build version 2.1 of package metadata.
Codecov Report
@@ Coverage Diff @@
## v2 #6423 +/- ##
=====================================
Coverage 0.05% 0.05%
=====================================
Files 273 273
Lines 21788 21788
=====================================
Hits 13 13
Misses 21775 21775 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤌💋
This should close out #5987 too for removing the universal wheel flag. |
This is one step in implementing this proposal: #6352 in that it will allow us to leverage PEP 517 to build sdists and wheels. Note the build process still does not automatically build the auto-complete index. See commit message for more details and rationale for each change.