asweigart / pyperclip

Python module for cross-platform clipboard functions.
https://pypi.python.org/pypi/pyperclip
BSD 3-Clause "New" or "Revised" License
1.65k stars 196 forks source link

Update package metadata #229

Open ofek opened 2 years ago

ofek commented 2 years ago

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

ofek commented 2 years ago

@asweigart bumping in case you missed ^ πŸ™‚

martinmiglio commented 1 year ago

Looking for this as Poetry 1.4 now requires PEP 517 compatibility

luzpaz commented 1 year ago

bump