From 97b9ca2f1600ed65dd94568ed396f1a21b55b84e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 16 Jan 2021 18:48:52 +0100 Subject: [PATCH 1/4] python3Packages.pytest-vcr: init at 1.0.2 --- .../python-modules/pytest-vcr/default.nix | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 pkgs/development/python-modules/pytest-vcr/default.nix diff --git a/pkgs/development/python-modules/pytest-vcr/default.nix b/pkgs/development/python-modules/pytest-vcr/default.nix new file mode 100644 index 00000000000..9373c597b36 --- /dev/null +++ b/pkgs/development/python-modules/pytest-vcr/default.nix @@ -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 ]; + }; +} From 7c1f97917f309a348e3383a49d9b4dc800db245b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 16 Jan 2021 18:49:21 +0100 Subject: [PATCH 2/4] python3Packages.pubnub: init at 4.8.0 --- .../python-modules/pubnub/default.nix | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 pkgs/development/python-modules/pubnub/default.nix diff --git a/pkgs/development/python-modules/pubnub/default.nix b/pkgs/development/python-modules/pubnub/default.nix new file mode 100644 index 00000000000..e4bab25fd9c --- /dev/null +++ b/pkgs/development/python-modules/pubnub/default.nix @@ -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 ]; + }; +} From 7a6701fbfd8890c5163f6390ad9311b0dc969def Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 16 Jan 2021 18:49:57 +0100 Subject: [PATCH 3/4] python3Packages.pubnubsub-handler: init at 1.0.9 --- .../pubnubsub-handler/default.nix | 34 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 6 ++++ 2 files changed, 40 insertions(+) create mode 100644 pkgs/development/python-modules/pubnubsub-handler/default.nix diff --git a/pkgs/development/python-modules/pubnubsub-handler/default.nix b/pkgs/development/python-modules/pubnubsub-handler/default.nix new file mode 100644 index 00000000000..32ad2a8e1b8 --- /dev/null +++ b/pkgs/development/python-modules/pubnubsub-handler/default.nix @@ -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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index cb786ff781e..1c170a3aee3 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5023,6 +5023,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 { }; @@ -6075,6 +6079,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 { }; From 291e54ecfe36505a9e808ae573baacee697ca2a0 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 16 Jan 2021 18:59:21 +0100 Subject: [PATCH 4/4] home-assistant: update component-packages --- pkgs/servers/home-assistant/component-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 861b53765ba..2efff4162ea 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -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 ];