2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, buildPythonPackage
|
|
|
|
, cbor2
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pycryptodomex
|
|
|
|
, pytestCheckHook
|
|
|
|
, pytest-vcr
|
|
|
|
, pytest-asyncio
|
|
|
|
, requests
|
2022-01-27 00:19:43 +00:00
|
|
|
, pythonOlder
|
2021-02-05 17:12:51 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pubnub";
|
2022-01-27 00:19:43 +00:00
|
|
|
version = "6.0.0";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = "python";
|
|
|
|
rev = "v${version}";
|
2022-01-27 00:19:43 +00:00
|
|
|
hash = "sha256-ktwPut4FBkPMukUk00I1xNOuTvSJkbskPOjoYDJN5Eg=";
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2021-04-08 16:26:57 +00:00
|
|
|
aiohttp
|
2021-02-05 17:12:51 +00:00
|
|
|
cbor2
|
|
|
|
pycryptodomex
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest-asyncio
|
|
|
|
pytest-vcr
|
2022-01-27 00:19:43 +00:00
|
|
|
pytestCheckHook
|
2021-02-05 17:12:51 +00:00
|
|
|
];
|
|
|
|
|
2021-04-08 16:26:57 +00:00
|
|
|
disabledTestPaths = [
|
2022-01-27 00:19:43 +00:00
|
|
|
# Tests require network access
|
2021-04-08 16:26:57 +00:00
|
|
|
"tests/integrational"
|
2022-01-27 00:19:43 +00:00
|
|
|
"tests/manual"
|
|
|
|
"tests/functional/push"
|
2021-02-05 17:12:51 +00:00
|
|
|
];
|
|
|
|
|
2022-01-27 00:19:43 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pubnub"
|
|
|
|
];
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python-based APIs for PubNub";
|
|
|
|
homepage = "https://github.com/pubnub/python";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|