Skip to content
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

Merged
merged 6 commits into from
Sep 27, 2021

Conversation

kyleknap
Copy link
Contributor

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.

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-commenter
Copy link

codecov-commenter commented Sep 24, 2021

Codecov Report

Merging #6423 (50eb336) into v2 (840c45b) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 840c45b...50eb336. Read the comment docs.

Copy link
Member

@nateprewitt nateprewitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤌💋

@kdaily
Copy link
Member

kdaily commented Sep 27, 2021

This should close out #5987 too for removing the universal wheel flag.

@kyleknap kyleknap merged commit 5f3d5d6 into aws:v2 Sep 27, 2021
@kyleknap kyleknap deleted the setup-refresh-v2 branch September 27, 2021 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants