Merge pull request #109556 from fabaff/pubnubsub-handler
This commit is contained in:
commit
ac15eb7752
57
pkgs/development/python-modules/pubnub/default.nix
Normal file
57
pkgs/development/python-modules/pubnub/default.nix
Normal file
|
@ -0,0 +1,57 @@
|
|||
{ lib
|
||||
, aiohttp
|
||||
, buildPythonPackage
|
||||
, cbor2
|
||||
, fetchFromGitHub
|
||||
, pycryptodomex
|
||||
, pytestCheckHook
|
||||
, pyyaml
|
||||
, pytest-vcr
|
||||
, pytest-asyncio
|
||||
, requests
|
||||
, six
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pubnub";
|
||||
version = "4.8.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = "python";
|
||||
rev = "v${version}";
|
||||
sha256 = "16wjal95042kh5fxhvji0rwmw892pacqcnyms520mw15wcwilqir";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
cbor2
|
||||
pycryptodomex
|
||||
requests
|
||||
six
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
aiohttp
|
||||
pycryptodomex
|
||||
pytest-asyncio
|
||||
pytestCheckHook
|
||||
pytest-vcr
|
||||
|
||||
];
|
||||
|
||||
# Some tests don't pass with recent releases of tornado/twisted
|
||||
pytestFlagsArray = [
|
||||
"--ignore tests/integrational"
|
||||
"--ignore tests/manual/asyncio"
|
||||
"--ignore tests/manual/tornado/test_reconnections.py"
|
||||
];
|
||||
|
||||
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 ];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, pubnub
|
||||
, pycryptodomex
|
||||
, requests
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pubnubsub-handler";
|
||||
version = "1.0.9";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256:1c44x19zi709sazgl060nkqa7vbaf3iyhwcnwdykhsbipvp6bscy";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
pubnub
|
||||
pycryptodomex
|
||||
requests
|
||||
];
|
||||
|
||||
# Project has no tests
|
||||
doCheck = false;
|
||||
pythonImportsCheck = [ "pubnubsubhandler" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "PubNub subscription between PubNub and Home Assistant";
|
||||
homepage = "https://github.com/w1ll1am23/pubnubsub-handler";
|
||||
license = with licenses; [ mit ];
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
36
pkgs/development/python-modules/pytest-vcr/default.nix
Normal file
36
pkgs/development/python-modules/pytest-vcr/default.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, pytestCheckHook
|
||||
, pytest
|
||||
, vcrpy
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pytest-vcr";
|
||||
version = "1.0.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ktosiek";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1i6fin91mklvbi8jzfiswvwf1m91f43smpj36a17xrzk4gisfs6i";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
pytest
|
||||
vcrpy
|
||||
];
|
||||
|
||||
# Tests are using an obsolete attribute 'config'
|
||||
# https://github.com/ktosiek/pytest-vcr/issues/43
|
||||
doCheck = false;
|
||||
pythonImportsCheck = [ "pytest_vcr" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Integration VCR.py into pytest";
|
||||
homepage = "https://github.com/ktosiek/pytest-vcr";
|
||||
license = with licenses; [ mit ];
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
|
@ -927,7 +927,7 @@
|
|||
"whois" = ps: with ps; [ python-whois ];
|
||||
"wiffi" = ps: with ps; [ ]; # missing inputs: wiffi
|
||||
"wilight" = ps: with ps; [ pywilight ];
|
||||
"wink" = ps: with ps; [ aiohttp-cors ]; # missing inputs: pubnubsub-handler python-wink
|
||||
"wink" = ps: with ps; [ aiohttp-cors pubnubsub-handler ]; # missing inputs: python-wink
|
||||
"wirelesstag" = ps: with ps; [ ]; # missing inputs: wirelesstagpy
|
||||
"withings" = ps: with ps; [ aiohttp-cors ]; # missing inputs: withings-api
|
||||
"wled" = ps: with ps; [ wled ];
|
||||
|
|
|
@ -5035,6 +5035,10 @@ in {
|
|||
|
||||
publicsuffix = callPackage ../development/python-modules/publicsuffix { };
|
||||
|
||||
pubnub = callPackage ../development/python-modules/pubnub { };
|
||||
|
||||
pubnubsub-handler = callPackage ../development/python-modules/pubnubsub-handler { };
|
||||
|
||||
pudb = callPackage ../development/python-modules/pudb { };
|
||||
|
||||
pulp = callPackage ../development/python-modules/pulp { };
|
||||
|
@ -6087,6 +6091,8 @@ in {
|
|||
|
||||
pytest-twisted = callPackage ../development/python-modules/pytest-twisted { };
|
||||
|
||||
pytest-vcr = callPackage ../development/python-modules/pytest-vcr { };
|
||||
|
||||
pytest-virtualenv = callPackage ../development/python-modules/pytest-virtualenv { };
|
||||
|
||||
pytest-warnings = callPackage ../development/python-modules/pytest-warnings { };
|
||||
|
|
Loading…
Reference in a new issue