From b41db12efcff7e0703dd293f8a77ba80fbb6058a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 5 Feb 2021 09:19:01 +0100 Subject: [PATCH] python3Packages.slack-sdk: init at 3.3.0 --- .../python-modules/slack-sdk/default.nix | 74 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 76 insertions(+) create mode 100644 pkgs/development/python-modules/slack-sdk/default.nix diff --git a/pkgs/development/python-modules/slack-sdk/default.nix b/pkgs/development/python-modules/slack-sdk/default.nix new file mode 100644 index 000000000000..2a2f3bf42fb0 --- /dev/null +++ b/pkgs/development/python-modules/slack-sdk/default.nix @@ -0,0 +1,74 @@ +{ lib +, aiodns +, aiohttp +, boto3 +, buildPythonPackage +, codecov +, databases +, fetchFromGitHub +, flake8 +, flask-sockets +, isPy3k +, psutil +, pytest-asyncio +, pytest-cov +, pytestCheckHook +, pytestrunner +, sqlalchemy +, websocket_client +, websockets +}: + +buildPythonPackage rec { + pname = "slack-sdk"; + version = "3.3.0"; + disabled = !isPy3k; + + src = fetchFromGitHub { + owner = "slackapi"; + repo = "python-slack-sdk"; + rev = "v${version}"; + sha256 = "0nr1avxycvjnvg1n8r09xi4sc5h6i4b64pzfgq14l55dgi5sv1rx"; + }; + + propagatedBuildInputs = [ + aiodns + aiohttp + boto3 + sqlalchemy + websocket_client + websockets + ]; + + checkInputs = [ + codecov + databases + flake8 + flask-sockets + psutil + pytest-asyncio + pytest-cov + pytestCheckHook + pytestrunner + ]; + + preCheck = '' + export HOME=$(mktemp -d) + ''; + + # Exclude tests that requires network features + pytestFlagsArray = [ "--ignore=integration_tests" ]; + disabledTests = [ + "test_start_raises_an_error_if_rtm_ws_url_is_not_returned" + "test_org_installation" + ]; + + pythonImportsCheck = [ "slack_sdk" ]; + + meta = with lib; { + description = "Slack Developer Kit for Python"; + homepage = "https://slack.dev/python-slack-sdk/"; + 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 e019628d1e2b..7fe755f48f77 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7220,6 +7220,8 @@ in { skorch = callPackage ../development/python-modules/skorch { }; + slack-sdk = callPackage ../development/python-modules/slack-sdk { }; + slackclient = callPackage ../development/python-modules/slackclient { }; sleekxmpp = callPackage ../development/python-modules/sleekxmpp { };