at 23.05-pre 1.1 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pytest-timeout 5, pytestCheckHook 6, pythonOlder 7, setuptools-scm 8, bashInteractive 9}: 10 11buildPythonPackage rec { 12 pname = "shtab"; 13 version = "1.5.8"; 14 format = "setuptools"; 15 16 disabled = pythonOlder "3.7"; 17 18 src = fetchFromGitHub { 19 owner = "iterative"; 20 repo = pname; 21 rev = "refs/tags/v${version}"; 22 hash = "sha256-FVV8AKe3PG387jarWYbXWxwVUAX6sM89KM8MuOr5cRw="; 23 }; 24 25 SETUPTOOLS_SCM_PRETEND_VERSION = version; 26 27 nativeBuildInputs = [ 28 setuptools-scm 29 ]; 30 31 checkInputs = [ 32 bashInteractive 33 pytest-timeout 34 pytestCheckHook 35 ]; 36 37 postPatch = '' 38 substituteInPlace setup.cfg \ 39 --replace " --cov=shtab --cov-report=term-missing --cov-report=xml" "" 40 ''; 41 42 pythonImportsCheck = [ 43 "shtab" 44 ]; 45 46 meta = with lib; { 47 description = "Module for shell tab completion of Python CLI applications"; 48 homepage = "https://docs.iterative.ai/shtab/"; 49 changelog = "https://github.com/iterative/shtab/releases/tag/v${version}"; 50 license = licenses.asl20; 51 maintainers = with maintainers; [ fab ]; 52 }; 53}