Open ofek opened 2 years ago
What exactly is hatch-autorun
? How does it work? I don't get how this replaces the pth file we use.
It essentially does the current logic of executing the src/pytest-cov.embed
in a PTH file.
CI passing btw
Just let me know if I can help!
I'll be honest here I'm not a fan of redoing something that works. But I am also curious how well this could work so how about this: release it as pytest-cov 5.0.0a (or beta) and we keep this in a special "alpha" branch till people try it out enough? This can only work if you pledge yourself to maintain pytest-cov's packaging from here on out :-)
I'm also in on this, starting with pluggy, then going for other pytest projects
I like hatch enough that i decided to let my own tool die in favour of it.
I rebased to fix conflicts. Would you mind triggering the CI with that button below?
I rebased again, accounting for https://github.com/pytest-dev/pytest-cov/pull/553#issuecomment-1284912148
flake?
I rebased again, accounting for https://github.com/pytest-dev/pytest-cov/pull/556
Would you mind triggering the CI with that button below?
Passing 🙂
Please rebase.
cc @graingert as requested!
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
andMANIFEST.in
. The build backendhatchling
(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.Python support
The earliest supported Python 3 version of Hatchling is 3.7, therefore I've also set that as the minimum here. Python 3.6 is EOL and other build backends like
flit-core
andsetuptools
also dropped support. Python 3.6 accounted for 6-8% of downloads in the last month: https://pypistats.org/packages/pytest-covNotes
*.egg-info
frompython setup.py develop
; this is now fixedCHANGELOG.rst
regex substitution was doing nothing so the PyPI landing page continues to be simplyREADME.rst
+CHANGELOG.rst
pytest-cov.pth
was being checked into the repo but is not necessary now so I've removed itFuture
pytest
out ofsetup.cfg
and intopyproject.toml