Skip to content

Update package metadata#229

Open
ofek wants to merge 1 commit intoasweigart:masterfrom
ofek:modernize-metadata
Open

Update package metadata#229
ofek wants to merge 1 commit intoasweigart:masterfrom
ofek:modernize-metadata

Conversation

@ofek
Copy link
Copy Markdown

@ofek ofek commented Aug 11, 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 😄

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, Gentoo Linux, MacPorts, OpenEmbedded, Spack, etc.

The earliest supported Python 2 & 3 version of Hatchling is 2.7 & 3.7, respectively, therefore I've also set those as the minimum here. Python <3.7 is EOL and other build backends like flit-core and setuptools also dropped support. This will not break anything because pip only looks for version candidates that satisfy the requires-python field. Here are stats for the curious: https://pypistats.org/packages/pyperclip

Notes

  • Let me know if you want me to also drop Python 2!

@ofek
Copy link
Copy Markdown
Author

ofek commented Sep 4, 2022

@asweigart bumping in case you missed ^ 🙂

@martinmiglio
Copy link
Copy Markdown

Looking for this as Poetry 1.4 now requires PEP 517 compatibility

@luzpaz
Copy link
Copy Markdown

luzpaz commented Aug 18, 2023

bump

Repository owner deleted a comment from MichaelCurrie Sep 18, 2025
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.

3 participants