summary refs log blame commit diff
path: root/pkgs/development/python-modules/pubnub/default.nix
blob: 0c87391aba01f366c6c6fb9c7698c4e0ecff34c3 (plain) (tree)
1
2
3
4
5
6
7
8
9
10






                    


                
             



                        
                    


                               




                         
                                                                 


                           
           


                 


                 
                  
              
                   

    
                       
                                  
                         

                           

    


                        







                                                  
{ lib
, aiohttp
, buildPythonPackage
, cbor2
, fetchFromGitHub
, pycryptodomex
, pytestCheckHook
, pytest-vcr
, pytest-asyncio
, requests
, pythonOlder
}:

buildPythonPackage rec {
  pname = "pubnub";
  version = "6.1.0";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = pname;
    repo = "python";
    rev = "v${version}";
    hash = "sha256-rAeZxCaSY9tgoMk7l+mlqqiZfD2yIGoywITC0Y2z7oI=";
  };

  propagatedBuildInputs = [
    aiohttp
    cbor2
    pycryptodomex
    requests
  ];

  checkInputs = [
    pytest-asyncio
    pytest-vcr
    pytestCheckHook
  ];

  disabledTestPaths = [
    # Tests require network access
    "tests/integrational"
    "tests/manual"
    "tests/functional/push"
  ];

  pythonImportsCheck = [
    "pubnub"
  ];

  meta = with lib; {
    description = "Python-based APIs for PubNub";
    homepage = "https://github.com/pubnub/python";
    license = with licenses; [ mit ];
    maintainers = with maintainers; [ fab ];
  };
}