at master 1.4 kB view raw
1{ 2 lib, 3 aiohttp, 4 buildPythonPackage, 5 busypie, 6 cbor2, 7 fetchFromGitHub, 8 h2, 9 httpx, 10 pycryptodomex, 11 pytest-asyncio, 12 pytest-vcr, 13 pytestCheckHook, 14 pythonOlder, 15 requests, 16 setuptools, 17}: 18 19buildPythonPackage rec { 20 pname = "pubnub"; 21 version = "10.4.1"; 22 pyproject = true; 23 24 disabled = pythonOlder "3.7"; 25 26 src = fetchFromGitHub { 27 owner = "pubnub"; 28 repo = "python"; 29 tag = version; 30 hash = "sha256-NI7rEudQ5sSj6cpPpFxEcqaeiQL6dJKK7C53BTJeMAg="; 31 }; 32 33 pythonRelaxDeps = [ "httpx" ]; 34 35 build-system = [ setuptools ]; 36 37 dependencies = [ 38 aiohttp 39 cbor2 40 h2 41 httpx 42 pycryptodomex 43 requests 44 ]; 45 46 nativeCheckInputs = [ 47 busypie 48 pytest-asyncio 49 pytest-vcr 50 pytestCheckHook 51 ]; 52 53 disabledTestPaths = [ 54 # Tests require network access 55 "tests/integrational" 56 "tests/manual" 57 "tests/functional/push" 58 # Examples 59 "tests/examples" 60 ]; 61 62 disabledTests = [ 63 "test_subscribe" 64 "test_handshaking" 65 ]; 66 67 pythonImportsCheck = [ "pubnub" ]; 68 69 meta = with lib; { 70 description = "Python-based APIs for PubNub"; 71 homepage = "https://github.com/pubnub/python"; 72 changelog = "https://github.com/pubnub/python/releases/tag/${src.tag}"; 73 # PubNub Software Development Kit License Agreement 74 # https://github.com/pubnub/python/blob/master/LICENSE 75 license = licenses.unfreeRedistributable; 76 maintainers = with maintainers; [ fab ]; 77 }; 78}