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