about summary refs log tree commit diff
path: root/pkgs/development/python-modules/habanero/default.nix
blob: 8bdfe84d9b6cd7925b9b51765bbf6902ff78bd18 (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
{ lib
, buildPythonPackage
, fetchFromGitHub
, requests
, tqdm
, nose
, vcrpy
, pytestCheckHook
, pythonOlder
}:

buildPythonPackage rec {
  pname = "habanero";
  version = "1.2.2";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "sckott";
    repo = pname;
    rev = "refs/tags/v${version}";
    hash = "sha256-i6tgMEiaDcaBR8XfGvEMXQfTaDp1RJRosj/EfF1dQU4=";
  };

  propagatedBuildInputs = [
    requests
    tqdm
  ];

  nativeCheckInputs = [
    pytestCheckHook
    vcrpy
  ];

  pythonImportsCheck = [
    "habanero"
  ];

  # almost the entirety of the test suite makes network calls
  pytestFlagsArray = [
    "test/test-filters.py"
  ];

  meta = with lib; {
    description = "Python interface to Library Genesis";
    homepage = "https://habanero.readthedocs.io/";
    license = licenses.mit;
    maintainers = with maintainers; [ nico202 ];
  };
}