Merge pull request #325122 from risicle/ris-paho-mqtt-2.x

python312Packages.paho-mqtt_2: init at 2.1.0
This commit is contained in:
Martin Weinelt 2024-07-07 22:34:33 +02:00 committed by GitHub
commit 8660d7b646
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 79 additions and 150 deletions

View File

@ -1,62 +0,0 @@
{
lib,
aiofiles,
asyncio-mqtt,
awesomeversion,
buildPythonPackage,
click,
fetchFromGitHub,
marshmallow,
poetry-core,
pyserial-asyncio,
pytest-asyncio,
pytestCheckHook,
pythonOlder,
}:
buildPythonPackage rec {
pname = "aiomysensors";
version = "0.3.16";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "MartinHjelmare";
repo = "aiomysensors";
rev = "refs/tags/v${version}";
hash = "sha256-1BpmjCgKiCZmBpBENlg79+I3UhkIxrgLAUD8ixpGUM8=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail " --cov=src --cov-report=term-missing:skip-covered" ""
'';
build-system = [ poetry-core ];
dependencies = [
aiofiles
asyncio-mqtt
awesomeversion
click
marshmallow
pyserial-asyncio
];
nativeCheckInputs = [
pytest-asyncio
pytestCheckHook
];
pythonImportsCheck = [ "aiomysensors" ];
meta = with lib; {
description = "Library to connect to MySensors gateways";
homepage = "https://github.com/MartinHjelmare/aiomysensors";
changelog = "https://github.com/MartinHjelmare/aiomysensors/releases/tag/v${version}";
license = with licenses; [ asl20 ];
maintainers = with maintainers; [ fab ];
mainProgram = "aiomysensors";
};
}

View File

@ -1,71 +0,0 @@
{
lib,
anyio,
buildPythonPackage,
fetchFromGitHub,
paho-mqtt,
pytestCheckHook,
pythonOlder,
setuptools,
setuptools-scm,
typing-extensions,
wheel,
}:
buildPythonPackage rec {
pname = "asyncio-mqtt";
version = "0.16.1";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "sbtinstruments";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-f3JqocjOEwNjo6Uv17ij6oEdrjb6Z2wTzdhdVhx46iM=";
};
nativeBuildInputs = [
setuptools
setuptools-scm
wheel
];
propagatedBuildInputs = [ paho-mqtt ] ++ lib.optionals (pythonOlder "3.10") [ typing-extensions ];
nativeCheckInputs = [
anyio
pytestCheckHook
];
pythonImportsCheck = [ "asyncio_mqtt" ];
disabledTests = [
# Tests require network access
"test_client_filtered_messages"
"test_client_logger"
"test_client_max_concurrent_outgoing_calls"
"test_client_no_pending_calls_warnings_with_max_concurrent_outgoing_calls"
"test_client_pending_calls_threshold"
"test_client_tls_context"
"test_client_tls_params"
"test_client_unfiltered_messages"
"test_client_unsubscribe"
"test_client_username_password "
"test_client_websockets"
"test_client_will"
"test_multiple_messages_generators"
];
# newer version are packaged as aiomqtt
passthru.skipBulkUpdate = true;
meta = with lib; {
description = "Idomatic asyncio wrapper around paho-mqtt";
homepage = "https://github.com/sbtinstruments/asyncio-mqtt";
license = licenses.bsd3;
changelog = "https://github.com/sbtinstruments/asyncio-mqtt/blob/v${version}/CHANGELOG.md";
maintainers = with maintainers; [ hexa ];
};
}

View File

@ -0,0 +1,42 @@
{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,
isPy3k,
pytestCheckHook,
mock,
six,
}:
buildPythonPackage rec {
pname = "paho-mqtt";
version = "1.6.1";
format = "setuptools";
src = fetchFromGitHub {
owner = "eclipse";
repo = "paho.mqtt.python";
rev = "v${version}";
hash = "sha256-9nH6xROVpmI+iTKXfwv2Ar1PAmWbEunI3HO0pZyK6Rg=";
};
nativeCheckInputs = [
pytestCheckHook
six
] ++ lib.optionals (!isPy3k) [ mock ];
doCheck = !stdenv.isDarwin;
pythonImportsCheck = [ "paho.mqtt" ];
meta = with lib; {
description = "MQTT version 3.1.1 client class";
homepage = "https://eclipse.org/paho";
license = licenses.epl10;
maintainers = with maintainers; [
mog
dotlambda
];
};
}

View File

@ -2,38 +2,57 @@
lib,
stdenv,
buildPythonPackage,
pythonOlder,
fetchFromGitHub,
isPy3k,
hatchling,
pytestCheckHook,
mock,
six,
}:
buildPythonPackage rec {
let
testing = fetchFromGitHub {
owner = "eclipse";
repo = "paho.mqtt.testing";
rev = "a4dc694010217b291ee78ee13a6d1db812f9babd";
hash = "sha256-SQoNdkWMjnasPjpXQF2yV97MUra8gb27pc3rNoA8Rjw=";
};
in buildPythonPackage rec {
pname = "paho-mqtt";
version = "1.6.1";
format = "setuptools";
version = "2.1.0";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "eclipse";
repo = "paho.mqtt.python";
rev = "v${version}";
hash = "sha256-9nH6xROVpmI+iTKXfwv2Ar1PAmWbEunI3HO0pZyK6Rg=";
hash = "sha256-VMq+WTW+njK34QUUTE6fR2j2OmHxVzR0wrC92zYb1rY=";
};
build-system = [
hatchling
];
nativeCheckInputs = [
pytestCheckHook
six
] ++ lib.optionals (!isPy3k) [ mock ];
];
doCheck = !stdenv.isDarwin;
pythonImportsCheck = [ "paho.mqtt" ];
preCheck = ''
ln -s ${testing} paho.mqtt.testing
# paho.mqtt not in top-level dir to get caught by this
export PYTHONPATH=".:$PYTHONPATH"
'';
meta = with lib; {
description = "MQTT version 3.1.1 client class";
changelog = "https://github.com/eclipse/paho.mqtt.python/blob/${src.rev}/ChangeLog.txt";
description = "MQTT version 5.0/3.1.1 client class";
homepage = "https://eclipse.org/paho";
license = licenses.epl10;
license = licenses.epl20;
maintainers = with maintainers; [
mog
dotlambda

View File

@ -17,13 +17,14 @@ python3.pkgs.buildPythonApplication rec {
};
pythonRelaxDeps = [
"defusedxml"
"packaging"
"psutil"
"python-gnupg"
];
build-system = with python3.pkgs; [ poetry-core ];
propagatedBuildInputs = with python3.pkgs; [
defusedxml
deprecated

View File

@ -37,6 +37,7 @@ mapAliases ({
acebinf = throw "acebinf has been removed because it is abandoned and broken."; # Added 2023-05-19
adafruit-nrfutil = throw "adafruit-nrfutil has been promoted to a top-level attribute name: `pkgs.adafruit-nrfutil`."; # Added 2023-11-19
aioaladdinconnect = throw "aioaladdinconnect has been removed, as the API is supported was obsoleted on 2024-01-24."; # Added 2024-06-07
aiomysensors = throw "aiomysensors has been removed, as it was packaged for Home Assistant, which migrated to pymysensors."; # Added 2024-07-07
aioh2 = throw "aioh2 has been removed because it is abandoned and broken."; # Added 2022-03-30
aionotify = throw "aionotify has been removed because is unmaintained and incompatible with python3.11."; # Added 2023-10-27
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 ({
APScheduler = apscheduler; # added 2023-02-19
async_generator = async-generator; # added 2023-08-08
async_stagger = async-stagger; # added 2023-08-08
asyncio-mqtt = throw "asyncio-mqtt has been replaced by aiomqtt, which is not API compatible."; # added 2024-07-07
asyncio-nats-client = nats-py; # added 2022-02-08
atsim_potentials = atsim-potentials; # added 2023-10-08
awkward0 = throw "awkward0 has been removed, use awkward instead"; # added 2022-12-13

View File

@ -329,8 +329,6 @@ self: super: with self; {
aiomusiccast = callPackage ../development/python-modules/aiomusiccast { };
aiomysensors = callPackage ../development/python-modules/aiomysensors { };
aiomysql = callPackage ../development/python-modules/aiomysql { };
aionanoleaf = callPackage ../development/python-modules/aionanoleaf { };
@ -889,8 +887,6 @@ self: super: with self; {
asyncio-dgram = callPackage ../development/python-modules/asyncio-dgram { };
asyncio-mqtt = callPackage ../development/python-modules/asyncio-mqtt { };
asyncio-rlock = callPackage ../development/python-modules/asyncio-rlock { };
asyncmy = callPackage ../development/python-modules/asyncmy { };
@ -9555,7 +9551,9 @@ self: super: with self; {
paginate = callPackage ../development/python-modules/paginate { };
paho-mqtt = callPackage ../development/python-modules/paho-mqtt { };
paho-mqtt_1 = callPackage ../development/python-modules/paho-mqtt/1.nix { };
paho-mqtt_2 = callPackage ../development/python-modules/paho-mqtt/default.nix { };
paho-mqtt = paho-mqtt_1;
palace = callPackage ../development/python-modules/palace { };