1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, defusedxml
5, flaky
6, keyring
7, requests-mock
8, requests-oauthlib
9, requests-toolbelt
10, setuptools-scm
11, setuptools-scm-git-archive
12, pytestCheckHook
13, pythonOlder
14}:
15
16buildPythonPackage rec {
17 pname = "jira";
18 version = "3.4.0";
19 format = "setuptools";
20
21 disabled = pythonOlder "3.7";
22
23 src = fetchFromGitHub {
24 owner = "pycontribs";
25 repo = pname;
26 rev = "refs/tags/${version}";
27 hash = "sha256-XyMywnuJOGSXWsMNbwNbMaOeAa9bosBg6rvfNKw77Ik=";
28 };
29
30 nativeBuildInputs = [
31 setuptools-scm
32 setuptools-scm-git-archive
33 ];
34
35 SETUPTOOLS_SCM_PRETEND_VERSION = version;
36
37 propagatedBuildInputs = [
38 defusedxml
39 keyring
40 requests-oauthlib
41 requests-toolbelt
42 ];
43
44 checkInputs = [
45 flaky
46 pytestCheckHook
47 requests-mock
48 ];
49
50 postPatch = ''
51 substituteInPlace setup.cfg \
52 --replace "--cov-report=xml --cov jira" ""
53 '';
54
55 pythonImportsCheck = [
56 "jira"
57 ];
58
59 # impure tests because of connectivity attempts to jira servers
60 doCheck = false;
61
62 meta = with lib; {
63 description = "Library to interact with the JIRA REST API";
64 homepage = "https://github.com/pycontribs/jira";
65 license = licenses.bsd2;
66 maintainers = with maintainers; [ globin ];
67 };
68}