depot/third_party/nixpkgs/pkgs/development/python-modules/shtab/default.nix
Default email 02cf88bb76 Project import generated by Copybara.
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
2022-08-12 15:06:08 +03:00

52 lines
1,022 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pytest-timeout
, pytestCheckHook
, pythonOlder
, setuptools-scm
, bashInteractive
}:
buildPythonPackage rec {
pname = "shtab";
version = "1.5.5";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "iterative";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-I6De64eawNi36c8NiyVxj63PkxnZfUYYT4Dw4l42Ztk=";
};
SETUPTOOLS_SCM_PRETEND_VERSION = version;
nativeBuildInputs = [
setuptools-scm
];
checkInputs = [
bashInteractive
pytest-timeout
pytestCheckHook
];
postPatch = ''
substituteInPlace setup.cfg \
--replace " --cov=shtab --cov-report=term-missing --cov-report=xml" ""
'';
pythonImportsCheck = [
"shtab"
];
meta = with lib; {
description = "Module for shell tab completion of Python CLI applications";
homepage = "https://docs.iterative.ai/shtab/";
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
};
}