1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, setuptools-scm
5, requests
6, tqdm
7, nose
8, vcrpy
9, pytestCheckHook
10, pythonOlder
11}:
12
13buildPythonPackage rec {
14 pname = "habanero";
15 version = "1.2.3";
16 format = "setuptools";
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchFromGitHub {
21 owner = "sckott";
22 repo = pname;
23 rev = "refs/tags/v${version}";
24 hash = "sha256-IQp85Cigs0in3X07a9d45nMC3X2tAkPzl5hFVhfr00o=";
25 };
26
27 nativeBuildInputs = [
28 setuptools-scm
29 ];
30
31 propagatedBuildInputs = [
32 requests
33 tqdm
34 ];
35
36 nativeCheckInputs = [
37 pytestCheckHook
38 vcrpy
39 ];
40
41 pythonImportsCheck = [
42 "habanero"
43 ];
44
45 # almost the entirety of the test suite makes network calls
46 pytestFlagsArray = [
47 "test/test-filters.py"
48 ];
49
50 meta = with lib; {
51 description = "Python interface to Library Genesis";
52 homepage = "https://habanero.readthedocs.io/";
53 license = licenses.mit;
54 maintainers = with maintainers; [ nico202 ];
55 };
56}