depot/third_party/nixpkgs/pkgs/development/python-modules/shtab/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

53 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pytest-timeout,
pytestCheckHook,
pythonOlder,
setuptools,
setuptools-scm,
bashInteractive,
}:
buildPythonPackage rec {
pname = "shtab";
version = "1.7.1";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "iterative";
repo = "shtab";
rev = "refs/tags/v${version}";
hash = "sha256-8bAwLSdJCzFw5Vf9CKBrH5zOoojeXds7aIRncl+sLBI=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail " --cov=shtab --cov-report=term-missing --cov-report=xml" ""
'';
nativeBuildInputs = [
setuptools
setuptools-scm
];
nativeCheckInputs = [
bashInteractive
pytest-timeout
pytestCheckHook
];
pythonImportsCheck = [ "shtab" ];
meta = with lib; {
description = "Module for shell tab completion of Python CLI applications";
mainProgram = "shtab";
homepage = "https://docs.iterative.ai/shtab/";
changelog = "https://github.com/iterative/shtab/releases/tag/v${version}";
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
};
}