python3Packages.covdefaults: init at 2.3.0

It is going to be required by the check phase of the upcoming version of `datamodel-code-generator`.

Co-authored-by: Diogo Correia <me@diogotc.com>
This commit is contained in:
Antonio Spadaro
2026-09-27 15:12:43 +02:00
parent 545f85b20c
commit ff11fa1628
2 changed files with 55 additions and 0 deletions

View File

@@ -0,0 +1,53 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
fetchpatch2,
# build-system
setuptools,
# dependencies
coverage,
# tests
pytestCheckHook,
}:
buildPythonPackage (finalAttrs: {
pname = "covdefaults";
version = "2.3.0";
pyproject = true;
src = fetchFromGitHub {
owner = "asottile";
repo = "covdefaults";
tag = "v${finalAttrs.version}";
hash = "sha256-/RqqvGL2a6sCNe5HrJ9Ty5SlingQ+dblVtGYd+z8ZKw=";
};
build-system = [ setuptools ];
dependencies = [ coverage ];
nativeCheckInputs = [ pytestCheckHook ];
patches = [
# Add support for coverage>=7.7.0. The patch is already in `main`
# but not included in tag v2.3.0
(fetchpatch2 {
url = "https://github.com/asottile/covdefaults/commit/18fbb656ef7e90ccd2af5dbef6f100054d96c866.patch";
hash = "sha256-/MEZEztJUKuEmFmIKTrEiZYmJ4pOFLphDDl1Q+c5TN0=";
})
];
pythonImportsCheck = [ "covdefaults" ];
meta = {
description = "A coverage plugin to provide sensible default settings";
homepage = "https://github.com/asottile/covdefaults";
changelog = "https://github.com/asottile/covdefaults/commits/${finalAttrs.src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ ilovelinux ];
};
})

View File

@@ -3729,6 +3729,8 @@ self: super: with self; {
courlan = callPackage ../development/python-modules/courlan { };
covdefaults = callPackage ../development/python-modules/covdefaults { };
coverage = callPackage ../development/python-modules/coverage { };
coveralls = callPackage ../development/python-modules/coveralls { };