1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 setuptools,
7 requests,
8 polling,
9 deprecated,
10 pytestCheckHook,
11 mock,
12 httpretty,
13}:
14
15buildPythonPackage rec {
16 pname = "linode-api";
17 version = "5.22.0";
18 pyproject = true;
19
20 disabled = pythonOlder "3.6";
21
22 # Sources from Pypi exclude test fixtures
23 src = fetchFromGitHub {
24 owner = "linode";
25 repo = "python-linode-api";
26 rev = "refs/tags/v${version}";
27 hash = "sha256-f9v9xhlOfSCKEWHmzi/tpoMIXccGwA6isoAAIZOf3r4=";
28 };
29
30 nativeBuildInputs = [ setuptools ];
31
32 propagatedBuildInputs = [
33 requests
34 polling
35 deprecated
36 ];
37
38 nativeCheckInputs = [
39 pytestCheckHook
40 mock
41 httpretty
42 ];
43
44 disabledTestPaths = [
45 # needs api token
46 "test/integration"
47 ];
48
49 pythonImportsCheck = [ "linode_api4" ];
50
51 meta = with lib; {
52 description = "Python library for the Linode API v4";
53 homepage = "https://github.com/linode/python-linode-api";
54 license = licenses.bsd3;
55 maintainers = with maintainers; [ glenns ];
56 };
57}