Files
nixpkgs/pkgs/development/python-modules/configargparse/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

51 lines
1011 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
mock,
pytestCheckHook,
pyyaml,
pythonAtLeast,
pythonOlder,
}:
buildPythonPackage rec {
pname = "configargparse";
version = "1.7.1";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "bw2";
repo = "ConfigArgParse";
tag = version;
hash = "sha256-wrWfQzr0smM83helOEJPbayrEpAtXJYYXIw4JnGLNho=";
};
optional-dependencies = {
yaml = [ pyyaml ];
};
nativeCheckInputs = [
pytestCheckHook
mock
]
++ lib.concatAttrValues optional-dependencies;
disabledTests = lib.optionals (pythonAtLeast "3.13") [
# regex mismatch
"testMutuallyExclusiveArgs"
];
pythonImportsCheck = [ "configargparse" ];
meta = {
description = "Drop-in replacement for argparse";
homepage = "https://github.com/bw2/ConfigArgParse";
changelog = "https://github.com/bw2/ConfigArgParse/releases/tag/${src.tag}";
license = lib.licenses.mit;
maintainers = [ ];
};
}