about summary refs log tree commit diff
path: root/pkgs/development/python-modules/spyse-python/default.nix
blob: 65e382ce30d14a16860e5ffae10ab6b51861fe31 (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
{ lib
, buildPythonPackage
, dataclasses-json
, fetchFromGitHub
, limiter
, pythonOlder
, requests
, responses
}:

buildPythonPackage rec {
  pname = "spyse-python";
  version = "2.2.3";

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "spyse-com";
    repo = pname;
    rev = "v${version}";
    sha256 = "041k0037anwaxp2mh7mdk8rdsw9hdr3arigyyqfxfn35x8j41c3k";
  };

  propagatedBuildInputs = [
    requests
    dataclasses-json
    responses
    limiter
  ];

  # Tests requires an API token
  doCheck = false;

  postPatch = ''
    substituteInPlace setup.py \
      --replace "'dataclasses~=0.6'," "" \
      --replace "responses~=0.13.3" "responses>=0.13.3"
  '';

  pythonImportsCheck = [
    "spyse"
  ];

  meta = with lib; {
    description = "Python module for spyse.com API";
    homepage = "https://github.com/spyse-com/spyse-python";
    license = with licenses; [ mit ];
    maintainers = with maintainers; [ fab ];
  };
}