Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 defusedxml, 6 flaky, 7 ipython, 8 keyring, 9 packaging, 10 pillow, 11 pyjwt, 12 pytestCheckHook, 13 pythonOlder, 14 requests, 15 requests-futures, 16 requests-mock, 17 requests-oauthlib, 18 requests-toolbelt, 19 setuptools, 20 setuptools-scm, 21 typing-extensions, 22}: 23 24buildPythonPackage rec { 25 pname = "jira"; 26 version = "3.8.0"; 27 pyproject = true; 28 29 disabled = pythonOlder "3.8"; 30 31 src = fetchFromGitHub { 32 owner = "pycontribs"; 33 repo = pname; 34 rev = "refs/tags/${version}"; 35 hash = "sha256-zE0fceCnyv0qKak8sRCXPCauC0KeOmczY/ZkVoHNcS8="; 36 }; 37 38 nativeBuildInputs = [ 39 setuptools 40 setuptools-scm 41 ]; 42 43 propagatedBuildInputs = [ 44 defusedxml 45 packaging 46 requests 47 requests-oauthlib 48 requests-toolbelt 49 pillow 50 typing-extensions 51 ]; 52 53 passthru.optional-dependencies = { 54 cli = [ 55 ipython 56 keyring 57 ]; 58 opt = [ 59 # filemagic 60 pyjwt 61 # requests-jwt 62 # requests-keyberos 63 ]; 64 async = [ requests-futures ]; 65 }; 66 67 nativeCheckInputs = [ 68 flaky 69 pytestCheckHook 70 requests-mock 71 ]; 72 73 postPatch = '' 74 substituteInPlace setup.cfg \ 75 --replace "--cov-report=xml --cov jira" "" 76 ''; 77 78 pythonImportsCheck = [ "jira" ]; 79 80 # impure tests because of connectivity attempts to jira servers 81 doCheck = false; 82 83 meta = with lib; { 84 description = "Library to interact with the JIRA REST API"; 85 homepage = "https://github.com/pycontribs/jira"; 86 changelog = "https://github.com/pycontribs/jira/releases/tag/${version}"; 87 license = licenses.bsd2; 88 maintainers = [ ]; 89 mainProgram = "jirashell"; 90 }; 91}