Skip to content

Commit 8660d7b

Browse files
authored
Merge pull request #325122 from risicle/ris-paho-mqtt-2.x
python312Packages.paho-mqtt_2: init at 2.1.0
2 parents aa3e6fa + c96f34f commit 8660d7b

File tree

7 files changed

+79
-150
lines changed

7 files changed

+79
-150
lines changed

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

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

pkgs/development/python-modules/asyncio-mqtt/default.nix

Lines changed: 0 additions & 71 deletions
This file was deleted.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
lib,
3+
stdenv,
4+
buildPythonPackage,
5+
fetchFromGitHub,
6+
isPy3k,
7+
pytestCheckHook,
8+
mock,
9+
six,
10+
}:
11+
12+
buildPythonPackage rec {
13+
pname = "paho-mqtt";
14+
version = "1.6.1";
15+
format = "setuptools";
16+
17+
src = fetchFromGitHub {
18+
owner = "eclipse";
19+
repo = "paho.mqtt.python";
20+
rev = "v${version}";
21+
hash = "sha256-9nH6xROVpmI+iTKXfwv2Ar1PAmWbEunI3HO0pZyK6Rg=";
22+
};
23+
24+
nativeCheckInputs = [
25+
pytestCheckHook
26+
six
27+
] ++ lib.optionals (!isPy3k) [ mock ];
28+
29+
doCheck = !stdenv.isDarwin;
30+
31+
pythonImportsCheck = [ "paho.mqtt" ];
32+
33+
meta = with lib; {
34+
description = "MQTT version 3.1.1 client class";
35+
homepage = "https://eclipse.org/paho";
36+
license = licenses.epl10;
37+
maintainers = with maintainers; [
38+
mog
39+
dotlambda
40+
];
41+
};
42+
}

pkgs/development/python-modules/paho-mqtt/default.nix

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,57 @@
22
lib,
33
stdenv,
44
buildPythonPackage,
5+
pythonOlder,
56
fetchFromGitHub,
6-
isPy3k,
7+
hatchling,
78
pytestCheckHook,
8-
mock,
9-
six,
109
}:
1110

12-
buildPythonPackage rec {
11+
let
12+
testing = fetchFromGitHub {
13+
owner = "eclipse";
14+
repo = "paho.mqtt.testing";
15+
rev = "a4dc694010217b291ee78ee13a6d1db812f9babd";
16+
hash = "sha256-SQoNdkWMjnasPjpXQF2yV97MUra8gb27pc3rNoA8Rjw=";
17+
};
18+
in buildPythonPackage rec {
1319
pname = "paho-mqtt";
14-
version = "1.6.1";
15-
format = "setuptools";
20+
version = "2.1.0";
21+
pyproject = true;
22+
23+
disabled = pythonOlder "3.7";
1624

1725
src = fetchFromGitHub {
1826
owner = "eclipse";
1927
repo = "paho.mqtt.python";
2028
rev = "v${version}";
21-
hash = "sha256-9nH6xROVpmI+iTKXfwv2Ar1PAmWbEunI3HO0pZyK6Rg=";
29+
hash = "sha256-VMq+WTW+njK34QUUTE6fR2j2OmHxVzR0wrC92zYb1rY=";
2230
};
2331

32+
build-system = [
33+
hatchling
34+
];
35+
2436
nativeCheckInputs = [
2537
pytestCheckHook
26-
six
27-
] ++ lib.optionals (!isPy3k) [ mock ];
38+
];
2839

2940
doCheck = !stdenv.isDarwin;
3041

3142
pythonImportsCheck = [ "paho.mqtt" ];
3243

44+
preCheck = ''
45+
ln -s ${testing} paho.mqtt.testing
46+
47+
# paho.mqtt not in top-level dir to get caught by this
48+
export PYTHONPATH=".:$PYTHONPATH"
49+
'';
50+
3351
meta = with lib; {
34-
description = "MQTT version 3.1.1 client class";
52+
changelog = "https://github.com/eclipse/paho.mqtt.python/blob/${src.rev}/ChangeLog.txt";
53+
description = "MQTT version 5.0/3.1.1 client class";
3554
homepage = "https://eclipse.org/paho";
36-
license = licenses.epl10;
55+
license = licenses.epl20;
3756
maintainers = with maintainers; [
3857
mog
3958
dotlambda

pkgs/tools/security/ospd-openvas/default.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@ python3.pkgs.buildPythonApplication rec {
1717
};
1818

1919
pythonRelaxDeps = [
20+
"defusedxml"
2021
"packaging"
22+
"psutil"
2123
"python-gnupg"
2224
];
2325

2426
build-system = with python3.pkgs; [ poetry-core ];
2527

26-
2728
propagatedBuildInputs = with python3.pkgs; [
2829
defusedxml
2930
deprecated

pkgs/top-level/python-aliases.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ mapAliases ({
3737
acebinf = throw "acebinf has been removed because it is abandoned and broken."; # Added 2023-05-19
3838
adafruit-nrfutil = throw "adafruit-nrfutil has been promoted to a top-level attribute name: `pkgs.adafruit-nrfutil`."; # Added 2023-11-19
3939
aioaladdinconnect = throw "aioaladdinconnect has been removed, as the API is supported was obsoleted on 2024-01-24."; # Added 2024-06-07
40+
aiomysensors = throw "aiomysensors has been removed, as it was packaged for Home Assistant, which migrated to pymysensors."; # Added 2024-07-07
4041
aioh2 = throw "aioh2 has been removed because it is abandoned and broken."; # Added 2022-03-30
4142
aionotify = throw "aionotify has been removed because is unmaintained and incompatible with python3.11."; # Added 2023-10-27
4243
aiosenseme = throw "aiosenseme has been removed, because it does no longer work with the latest firmware and has become unmaintained"; # Added 2023-07-05
@@ -53,6 +54,7 @@ mapAliases ({
5354
APScheduler = apscheduler; # added 2023-02-19
5455
async_generator = async-generator; # added 2023-08-08
5556
async_stagger = async-stagger; # added 2023-08-08
57+
asyncio-mqtt = throw "asyncio-mqtt has been replaced by aiomqtt, which is not API compatible."; # added 2024-07-07
5658
asyncio-nats-client = nats-py; # added 2022-02-08
5759
atsim_potentials = atsim-potentials; # added 2023-10-08
5860
awkward0 = throw "awkward0 has been removed, use awkward instead"; # added 2022-12-13

pkgs/top-level/python-packages.nix

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,6 @@ self: super: with self; {
329329

330330
aiomusiccast = callPackage ../development/python-modules/aiomusiccast { };
331331

332-
aiomysensors = callPackage ../development/python-modules/aiomysensors { };
333-
334332
aiomysql = callPackage ../development/python-modules/aiomysql { };
335333

336334
aionanoleaf = callPackage ../development/python-modules/aionanoleaf { };
@@ -889,8 +887,6 @@ self: super: with self; {
889887

890888
asyncio-dgram = callPackage ../development/python-modules/asyncio-dgram { };
891889

892-
asyncio-mqtt = callPackage ../development/python-modules/asyncio-mqtt { };
893-
894890
asyncio-rlock = callPackage ../development/python-modules/asyncio-rlock { };
895891

896892
asyncmy = callPackage ../development/python-modules/asyncmy { };
@@ -9555,7 +9551,9 @@ self: super: with self; {
95559551

95569552
paginate = callPackage ../development/python-modules/paginate { };
95579553

9558-
paho-mqtt = callPackage ../development/python-modules/paho-mqtt { };
9554+
paho-mqtt_1 = callPackage ../development/python-modules/paho-mqtt/1.nix { };
9555+
paho-mqtt_2 = callPackage ../development/python-modules/paho-mqtt/default.nix { };
9556+
paho-mqtt = paho-mqtt_1;
95599557

95609558
palace = callPackage ../development/python-modules/palace { };
95619559

0 commit comments

Comments
 (0)