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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update package metadata #1612

Merged
merged 1 commit into from Aug 24, 2022
Merged

Update package metadata #1612

merged 1 commit into from Aug 24, 2022

Conversation

ofek
Copy link
Contributor

@ofek ofek commented Aug 24, 2022

Background

Hello there! The Python packaging ecosystem has standardized on the interface for build backends (PEP 517/PEP 660) and the format for metadata declaration (PEP 621/PEP 631). As a result, the execution of setup.py files is now deprecated.

So, I'm spending my free time updating important projects so that they are modernized and set an example for others 馃槃

This is a follow-up to encode/httpx#2334 (comment)

Summary of changes

This implements PEP 621, obviating the need for setup.py and MANIFEST.in. The build backend hatchling (of which I am a maintainer in the PyPA) is now used as that is the default in the official Python packaging tutorial. Hatchling is available on all the major distribution channels such as Debian, Fedora, Arch Linux, conda-forge, Nixpkgs, Alpine Linux, FreeBSD/OpenBSD, Gentoo Linux, MacPorts, OpenEmbedded, Spack, MSYS2, etc.

Notes

  • The source distributions on PyPI are erroneously shipping a build artifact *.egg-info from python setup.py develop; this is now fixed
  • The default build output directory dist/ is now excluded from source control

Future

  • Move config for tools like pytest out of setup.cfg and into pyproject.toml
  • We could ship optional wheels compiled with Mypyc, as Black recently did

Copy link
Sponsor Member

@Kludex Kludex left a comment

Choose a reason for hiding this comment

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

Thanks @ofek 馃檹

@Kludex Kludex merged commit 9cd609e into encode:master Aug 24, 2022
@ofek ofek deleted the modernize-metadata branch August 24, 2022 12:20
Kludex pushed a commit to sephioh/uvicorn that referenced this pull request Oct 29, 2022
Kludex pushed a commit that referenced this pull request Oct 29, 2022
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.

None yet

2 participants