Merge pull request #111964 from fabaff/bump-slackclient

python3Packages.slackclient: 2.5.0 -> 2.9.3, python3Packages.slack-sdk: init at 3.3.0
This commit is contained in:
Florian Klink 2021-02-15 00:24:34 +01:00 committed by GitHub
commit 4a8edd0948
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 160 additions and 67 deletions

View File

@ -1,75 +1,90 @@
{ lib, fetchFromGitHub, python, glibcLocales }:
{ lib
, ansi
, buildPythonApplication
, colorlog
, daemonize
, deepmerge
, dulwich
, fetchFromGitHub
, flask
, glibcLocales
, hypchat
, irc
, jinja2
, markdown
, mock
, pyasn1
, pyasn1-modules
, pygments
, pygments-markdown-lexer
, pyopenssl
, pytestCheckHook
, requests
, slackclient
, sleekxmpp
, telegram
, webtest
}:
let
py = python.override {
packageOverrides = self: super: {
# errbot requires markdown<3, and is not compatible with it either.
markdown = super.markdown.overridePythonAttrs (oldAttrs: rec {
version = "2.6.11";
src = super.fetchPypi {
pname = "Markdown";
inherit version;
sha256 = "108g80ryzykh8bj0i7jfp71510wrcixdi771lf2asyghgyf8cmm8";
};
});
# errbot requires slackclient 1.x, see https://github.com/errbotio/errbot/pull/1367
# latest 1.x release would be 1.3.2, but it requires an older websocket_client than the one in nixpkgs
# so let's just vendor the known-working version until they've migrated to 2.x.
slackclient = super.slackclient.overridePythonAttrs (oldAttrs: rec {
version = "1.2.1";
pname = "slackclient";
src = fetchFromGitHub {
owner = "slackapi";
repo = "python-slackclient";
rev = version;
sha256 = "073fwf6fm2sqdp5ms3vm1v3ljh0pldi69k048404rp6iy3cfwkp0";
};
propagatedBuildInputs = with self; [ websocket_client requests six ];
checkInputs = with self; [ pytest codecov coverage mock pytestcov pytest-mock responses flake8 ];
# test_server.py fails because it needs connection (I think);
checkPhase = ''
py.test --cov-report= --cov=slackclient tests --ignore=tests/test_server.py
'';
});
};
};
in
py.pkgs.buildPythonApplication rec {
buildPythonApplication rec {
pname = "errbot";
version = "6.1.1";
version = "6.1.7";
src = fetchFromGitHub {
owner = "errbotio";
repo = "errbot";
rev = version;
sha256 = "1s4dl1za5imwsv6j3y7m47dy91hmqd5n221kkqm9ni4mpzgpffz0";
sha256 = "02h44qd3d91zy657hyqsw3gskgxg31848pw6zpb8dhd1x84z5y77";
};
LC_ALL = "en_US.utf8";
buildInputs = [ glibcLocales ];
propagatedBuildInputs = with py.pkgs; [
webtest requests jinja2 flask dulwich
pyopenssl colorlog markdown ansi pygments
daemonize pygments-markdown-lexer telegram irc slackclient
sleekxmpp pyasn1 pyasn1-modules hypchat
propagatedBuildInputs = [
ansi
colorlog
daemonize
deepmerge
dulwich
flask
hypchat
irc
jinja2
markdown
pyasn1
pyasn1-modules
pygments
pygments-markdown-lexer
pyopenssl
requests
slackclient
sleekxmpp
telegram
webtest
];
checkInputs = with py.pkgs; [ mock pytest ];
# avoid tests that do network calls
checkPhase = ''
pytest tests -k 'not backup and not broken_plugin and not plugin_cycle'
'';
checkInputs = [
mock
pytestCheckHook
];
# Slack backend test has an import issue
pytestFlagsArray = [ "--ignore=tests/backend_tests/slack_test.py" ];
disabledTests = [
"backup"
"broken_plugin"
"plugin_cycle"
];
pythonImportsCheck = [ "errbot" ];
meta = with lib; {
description = "Chatbot designed to be simple to extend with plugins written in Python";
homepage = "http://errbot.io/";
maintainers = with maintainers; [ fpletz globin ];
license = licenses.gpl3;
license = licenses.gpl3Plus;
platforms = platforms.linux;
# flaky on darwin, "RuntimeError: can't start new thread"
};

View File

@ -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 ];
};
}

View File

@ -1,15 +1,15 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, aiohttp
, black
, buildPythonPackage
, codecov
, fetchFromGitHub
, flake8
, isPy3k
, mock
, psutil
, pytest-cov
, pytest-mock
, pytestCheckHook
, pytestcov
, pytestrunner
, requests
, responses
@ -19,15 +19,15 @@
buildPythonPackage rec {
pname = "python-slackclient";
version = "2.5.0";
version = "2.9.3";
disabled = !isPy3k;
src = fetchFromGitHub {
owner = "slackapi";
repo = pname;
rev = version;
sha256 = "1ngj1mivbln19546195k400w9yaw69g0w6is7c75rqwyxr8wgzsk";
owner = "slackapi";
repo = "python-slack-sdk";
rev = "v${version}";
sha256 = "1rfb7izgddv28ag37gdnv3sd8z2zysrxs7ad8x20x690zshpaq16";
};
propagatedBuildInputs = [
@ -38,17 +38,21 @@ buildPythonPackage rec {
];
checkInputs = [
black
codecov
flake8
mock
psutil
pytest-cov
pytest-mock
pytestCheckHook
pytestcov
pytestrunner
responses
];
# Exclude tests that requires network features
pytestFlagsArray = [ "--ignore=integration_tests" ];
disabledTests = [ "test_start_raises_an_error_if_rtm_ws_url_is_not_returned" ];
pythonImportsCheck = [ "slack" ];
meta = with lib; {

View File

@ -21885,9 +21885,7 @@ in
eq10q = callPackage ../applications/audio/eq10q { };
errbot = callPackage ../applications/networking/errbot {
python = python3;
};
errbot = python3Packages.callPackage ../applications/networking/errbot { };
espeak-classic = callPackage ../applications/audio/espeak { };

View File

@ -7256,6 +7256,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 { };