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