1{ stdenv
2, lib
3, aiodns
4, aiohttp
5, boto3
6, buildPythonPackage
7, codecov
8, fetchFromGitHub
9, flake8
10, flask-sockets
11, moto
12, pythonOlder
13, psutil
14, pytest-asyncio
15, pytestCheckHook
16, sqlalchemy
17, websocket-client
18, websockets
19}:
20
21buildPythonPackage rec {
22 pname = "slack-sdk";
23 version = "3.24.0";
24 format = "setuptools";
25
26 disabled = pythonOlder "3.6";
27
28 src = fetchFromGitHub {
29 owner = "slackapi";
30 repo = "python-slack-sdk";
31 rev = "refs/tags/v${version}";
32 hash = "sha256-Euea7O2CYapTAlK+PZEuyGhVdpT/N44rFGSRvPiJyNs=";
33 };
34
35 propagatedBuildInputs = [
36 aiodns
37 aiohttp
38 boto3
39 sqlalchemy
40 websocket-client
41 websockets
42 ];
43
44 nativeCheckInputs = [
45 codecov
46 flake8
47 flask-sockets
48 moto
49 psutil
50 pytest-asyncio
51 pytestCheckHook
52 ];
53
54 preCheck = ''
55 export HOME=$(mktemp -d)
56 '';
57
58 disabledTestPaths = [
59 # Exclude tests that requires network features
60 "integration_tests"
61 ];
62
63 disabledTests = [
64 # Requires network features
65 "test_start_raises_an_error_if_rtm_ws_url_is_not_returned"
66 "test_org_installation"
67 "test_interactions"
68 "test_issue_690_oauth_access"
69 ];
70
71 pythonImportsCheck = [
72 "slack_sdk"
73 ];
74
75 meta = with lib; {
76 description = "Slack Developer Kit for Python";
77 homepage = "https://slack.dev/python-slack-sdk/";
78 changelog = "https://github.com/slackapi/python-slack-sdk/releases/tag/v${version}";
79 license = with licenses; [ mit ];
80 maintainers = with maintainers; [ fab ];
81 };
82}