depot/third_party/nixpkgs/pkgs/development/python-modules/slack-sdk/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

89 lines
1.6 KiB
Nix

{
lib,
stdenv,
aiodns,
aiohttp,
boto3,
buildPythonPackage,
codecov,
fetchFromGitHub,
flake8,
flask-sockets,
moto,
pythonOlder,
psutil,
pytest-asyncio,
pytestCheckHook,
setuptools,
sqlalchemy,
websocket-client,
websockets,
}:
buildPythonPackage rec {
pname = "slack-sdk";
version = "3.29.0";
pyproject = true;
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "slackapi";
repo = "python-slack-sdk";
rev = "refs/tags/v${version}";
hash = "sha256-49dSRg0nrTXuXfnrC2/3p/zYMxouXO9FLqSBSxg4TcU=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail ', "pytest-runner"' ""
'';
build-system = [ setuptools ];
dependencies = [
aiodns
aiohttp
boto3
sqlalchemy
websocket-client
websockets
];
nativeCheckInputs = [
codecov
flake8
flask-sockets
moto
psutil
pytest-asyncio
pytestCheckHook
];
preCheck = ''
export HOME=$(mktemp -d)
'';
disabledTestPaths = [
# Exclude tests that requires network features
"integration_tests"
];
disabledTests = [
# Requires network features
"test_start_raises_an_error_if_rtm_ws_url_is_not_returned"
"test_org_installation"
"test_interactions"
"test_issue_690_oauth_access"
];
pythonImportsCheck = [ "slack_sdk" ];
meta = with lib; {
description = "Slack Developer Kit for Python";
homepage = "https://slack.dev/python-slack-sdk/";
changelog = "https://github.com/slackapi/python-slack-sdk/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}