1{ lib
2, buildPythonPackage
3, defusedxml
4, fetchFromGitHub
5, marshmallow
6, pytest-datafiles
7, pytest-vcr
8, pytestCheckHook
9, python-box
10, python-dateutil
11, pythonOlder
12, requests
13, requests-pkcs12
14, responses
15, restfly
16, semver
17, setuptools
18, typing-extensions
19}:
20
21buildPythonPackage rec {
22 pname = "pytenable";
23 version = "1.4.13";
24 pyproject = true;
25
26 disabled = pythonOlder "3.7";
27
28 src = fetchFromGitHub {
29 owner = "tenable";
30 repo = "pyTenable";
31 rev = "refs/tags/${version}";
32 hash = "sha256-UY3AFnPplmU0jrV4LIKH4+2tcJEFkKMqO2GWVkgaHYE=";
33 };
34
35 nativeBuildInputs = [
36 setuptools
37 ];
38
39 propagatedBuildInputs = [
40 defusedxml
41 marshmallow
42 python-box
43 python-dateutil
44 requests
45 restfly
46 semver
47 typing-extensions
48 ];
49
50 nativeCheckInputs = [
51 pytest-datafiles
52 pytest-vcr
53 pytestCheckHook
54 requests-pkcs12
55 responses
56 ];
57
58 disabledTestPaths = [
59 # Disable tests that requires network access
60 "tests/io/"
61 ];
62
63 disabledTests = [
64 # Disable tests that requires a Docker container
65 "test_uploads_docker_push_name_typeerror"
66 "test_uploads_docker_push_tag_typeerror"
67 "test_uploads_docker_push_cs_name_typeerror"
68 "test_uploads_docker_push_cs_tag_typeerror"
69 # Test requires network access
70 "test_assets_list_vcr"
71 "test_events_list_vcr"
72 ];
73
74 pythonImportsCheck = [
75 "tenable"
76 ];
77
78 meta = with lib; {
79 description = "Python library for the Tenable.io and TenableSC API";
80 homepage = "https://github.com/tenable/pyTenable";
81 changelog = "https://github.com/tenable/pyTenable/releases/tag/${version}";
82 license = with licenses; [ mit ];
83 maintainers = with maintainers; [ fab ];
84 };
85}