about summary refs log tree commit diff
path: root/pkgs/development/python-modules/github3_py/default.nix
blob: e92af9380844c0eba0bcbdf7d08150dc4ed52c66 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{ lib
, buildPythonPackage
, pythonOlder
, fetchPypi
, requests
, uritemplate
, python-dateutil
, pyjwt
, pytestCheckHook
, betamax
, betamax-matchers
}:

buildPythonPackage rec {
  pname = "github3.py";
  version = "3.2.0";
  format = "setuptools";

  disabled = pythonOlder "3.6";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-Cbcr4Ul9NGsJaM3oNgoNavedwgbQFJpjzT7IbGXDd8w=";
  };

  propagatedBuildInputs = [
    requests
    uritemplate
    python-dateutil
    pyjwt
  ]
  ++ pyjwt.optional-dependencies.crypto;

  nativeCheckInputs = [
    pytestCheckHook
    betamax
    betamax-matchers
  ];

  # Solves "__main__.py: error: unrecognized arguments: -nauto"
  preCheck = ''
    rm tox.ini
  '';

  disabledTests = [
    # FileNotFoundError: [Errno 2] No such file or directory: 'tests/id_rsa.pub'
    "test_delete_key"
  ];

  meta = with lib; {
    homepage = "https://github3py.readthedocs.org/en/master/";
    description = "A wrapper for the GitHub API written in python";
    license = licenses.bsd3;
    maintainers = with maintainers; [ pSub ];
  };
}