Skip to content

Commit 4da2ae6

Browse files
authored
Merge pull request #322997 from fabaff/slackclient-remove
python312Packages.slackclient: rename
2 parents 766a29d + 1cd6c81 commit 4da2ae6

File tree

8 files changed

+135
-113
lines changed

8 files changed

+135
-113
lines changed

pkgs/applications/networking/opsdroid/default.nix

Lines changed: 60 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,80 @@
1-
{ lib, fetchFromGitHub, python3Packages }:
1+
{
2+
lib,
3+
fetchFromGitHub,
4+
python3Packages,
5+
}:
26

37
python3Packages.buildPythonPackage rec {
48
pname = "opsdroid";
5-
version = "0.25.0";
9+
version = "0.30.0";
10+
pyproject = true;
611

712
src = fetchFromGitHub {
813
owner = "opsdroid";
914
repo = "opsdroid";
10-
rev = "v${version}";
11-
sha256 = "0f32jf2rds9543akysxinf3hsgzr0w880xwcrcm1r2r0nhp8b8s5";
15+
rev = "refs/tags/v${version}";
16+
hash = "sha256-7H44wdhJD4Z6OP1sUmSGlepuvx+LlwKLq7iR8cwqR24=";
1217
};
1318

14-
disabled = !python3Packages.isPy3k;
19+
build-system = with python3Packages; [ setuptools ];
1520

16-
# tests folder is not included in release
17-
doCheck = false;
18-
19-
propagatedBuildInputs = with python3Packages; [
20-
click babel opsdroid-get-image-size slackclient webexteamssdk bleach
21-
parse emoji puremagic yamale nbformat websockets pycron nbconvert
22-
aiohttp matrix-api-async aioredis aiosqlite arrow pyyaml motor regex
23-
mattermostdriver setuptools voluptuous ibm-watson tailer multidict
24-
watchgod get-video-properties appdirs bitstring matrix-nio
25-
] ++ matrix-nio.optional-dependencies.e2e;
21+
dependencies =
22+
with python3Packages;
23+
[
24+
aiohttp
25+
aiohttp-middlewares
26+
aioredis
27+
aiosqlite
28+
appdirs
29+
arrow
30+
babel
31+
bitstring
32+
bleach
33+
# botbuilder-core, connector for teams
34+
certifi
35+
click
36+
# dialogflow, connector for Dialogflow
37+
dnspython
38+
emoji
39+
get-video-properties
40+
ibm-watson
41+
matrix-nio
42+
mattermostdriver
43+
motor
44+
multidict
45+
nbconvert
46+
nbformat
47+
opsdroid-get-image-size
48+
parse
49+
puremagic
50+
pycron
51+
python-olm
52+
pyyaml
53+
regex
54+
rich
55+
slack-sdk
56+
tailer
57+
voluptuous
58+
watchgod
59+
webexteamssdk
60+
wrapt
61+
]
62+
++ matrix-nio.optional-dependencies.e2e;
2663

2764
passthru.python = python3Packages.python;
2865

66+
# Tests are not included in releases
67+
doCheck = false;
68+
2969
meta = with lib; {
3070
description = "Open source chat-ops bot framework";
3171
homepage = "https://opsdroid.dev";
32-
maintainers = with maintainers; [ globin willibutz ];
72+
changelog = "https://github.com/opsdroid/opsdroid/releases/tag/v${version}";
3373
license = licenses.asl20;
74+
maintainers = with maintainers; [
75+
globin
76+
willibutz
77+
];
3478
platforms = platforms.unix;
3579
mainProgram = "opsdroid";
3680
};
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
lib,
3+
aiohttp,
4+
async-timeout,
5+
buildPythonPackage,
6+
fetchFromGitHub,
7+
poetry-core,
8+
pytest-aiohttp,
9+
pytestCheckHook,
10+
pythonOlder,
11+
yarl,
12+
}:
13+
14+
buildPythonPackage rec {
15+
pname = "aiohttp-middlewares";
16+
version = "2.3.0";
17+
pyproject = true;
18+
19+
disabled = pythonOlder "3.8";
20+
21+
src = fetchFromGitHub {
22+
owner = "playpauseandstop";
23+
repo = "aiohttp-middlewares";
24+
rev = "refs/tags/v${version}";
25+
hash = "sha256-/xij16JUtq5T5KYinduEP+o4XxFQPyL7pfwvZnS96+U=";
26+
};
27+
28+
postPatch = ''
29+
sed -i "/addopts/d" pyproject.toml
30+
'';
31+
32+
build-system = [ poetry-core ];
33+
34+
dependencies = [
35+
aiohttp
36+
async-timeout
37+
yarl
38+
];
39+
40+
nativeCheckInputs = [
41+
pytest-aiohttp
42+
pytestCheckHook
43+
];
44+
45+
pythonImportsCheck = [ "aiohttp_middlewares" ];
46+
47+
meta = with lib; {
48+
description = "Collection of useful middlewares for aiohttp.web applications";
49+
homepage = "https://github.com/playpauseandstop/aiohttp-middlewares";
50+
changelog = "https://github.com/playpauseandstop/aiohttp-middlewares/blob/${version}/CHANGELOG.rst";
51+
license = licenses.bsd3;
52+
maintainers = with maintainers; [ fab ];
53+
};
54+
}

pkgs/development/python-modules/slackclient/default.nix

Lines changed: 0 additions & 94 deletions
This file was deleted.

pkgs/servers/home-assistant/component-packages.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4094,7 +4094,7 @@
40944094
ha-ffmpeg
40954095
];
40964096
"slack" = ps: with ps; [
4097-
slackclient
4097+
slack-sdk
40984098
];
40994099
"sleepiq" = ps: with ps; [
41004100
asyncsleepiq

pkgs/servers/home-assistant/default.nix

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,22 @@ let
441441
];
442442
};
443443

444+
slack-sdk = super.slack-sdk.overridePythonAttrs (oldAttrs: rec {
445+
version = "2.5.0";
446+
src = fetchFromGitHub {
447+
owner = "slackapi";
448+
repo = "python-slackclient";
449+
rev = "refs/tags/${version}";
450+
hash = "sha256-U//HUe6e41wOOzoaDl4yXPnEASCzpGBIScHStWMN8tk=";
451+
};
452+
postPatch = ''
453+
substituteInPlace setup.py \
454+
--replace-fail "pytest-runner" ""
455+
'';
456+
pythonImportsCheck = [ "slack" ];
457+
doCheck = false; # Tests changed a lot for > 3
458+
});
459+
444460
tuf = super.tuf.overridePythonAttrs rec {
445461
version = "2.1.0";
446462
src = fetchFromGitHub {

pkgs/servers/home-assistant/update-component-packages.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"fiblary3": "fiblary3-fork", # https://github.com/home-assistant/core/issues/66466
4343
"HAP-python": "hap-python",
4444
"ollama-hass": "ollama",
45+
"slackclient": "slack-sdk",
4546
"SQLAlchemy": "sqlalchemy",
4647
"tensorflow": "tensorflow",
4748
"yt-dlp": "yt-dlp",

pkgs/top-level/python-aliases.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,7 @@ mapAliases ({
504504
sharkiqpy = sharkiq; # added 2022-05-21
505505
shouldbe = throw "shouldbe was removed, because it was disabled on all python version since 3.8 and last updated in 2019."; # added 2024-05-12
506506
sip_4 = sip4; # added 2024-01-07
507+
slackclient = slack-sdk; # added 2024-06-27
507508
ssh-mitm = throw "ssh-mitm was removed in favor of the top-level ssh-mitm"; # added 2023-05-09
508509
smart_open = smart-open; # added 2021-03-14
509510
smmap2 = throw "smmap2 has been deprecated, use smmap instead."; # added 2020-03-14

pkgs/top-level/python-packages.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,8 @@ self: super: with self; {
253253

254254
aiohttp-jinja2 = callPackage ../development/python-modules/aiohttp-jinja2 { };
255255

256+
aiohttp-middlewares = callPackage ../development/python-modules/aiohttp-middlewares { };
257+
256258
aiohttp-oauthlib = callPackage ../development/python-modules/aiohttp-oauthlib { };
257259

258260
aiohttp-openmetrics = callPackage ../development/python-modules/aiohttp-openmetrics { };
@@ -14167,8 +14169,6 @@ self: super: with self; {
1416714169

1416814170
slack-sdk = callPackage ../development/python-modules/slack-sdk { };
1416914171

14170-
slackclient = callPackage ../development/python-modules/slackclient { };
14171-
1417214172
sleekxmpp = callPackage ../development/python-modules/sleekxmpp { };
1417314173

1417414174
sleepyq = callPackage ../development/python-modules/sleepyq { };

0 commit comments

Comments
 (0)