Fabian Affolter 2023-08-13 11:38:21 +02:00
parent 70e9e2cd81
commit 07b5160987

View File

@ -1,41 +1,29 @@
{ lib
, anyio
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
# build-system
, paho-mqtt
, poetry-core
, poetry-dynamic-versioning
# dependencies
, paho-mqtt
, typing-extensions
# tests
, anyio
, pytestCheckHook
, pythonOlder
, typing-extensions
}:
buildPythonPackage rec {
pname = "aiomqtt";
version = "1.0.0";
version = "1.1.0";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "sbtinstruments";
repo = "aiomqtt";
rev = "v${version}";
hash = "sha256-ct4KIGxiC5m0yrid0tOa/snO9oErxbqhLLH9kD69aEQ=";
rev = "refs/tags/v${version}";
hash = "sha256-8f3opbvN/hmT6AEMD7Co5n5IqdhP0higbaDGUBWJRzU=";
};
patches = [
(fetchpatch {
# adds test marker for network access
url = "https://github.com/sbtinstruments/aiomqtt/commit/225c1bfc99bc6ff908bd03c1115963e43ab8a9e6.patch";
hash = "sha256-UMEwCoX2mWBA7+p+JujkH5fc9sd/2hbb28EJ0fN24z4=";
})
];
nativeBuildInputs = [
poetry-core
poetry-dynamic-versioning
@ -46,13 +34,15 @@ buildPythonPackage rec {
typing-extensions
];
pythonImportsCheck = [ "aiomqtt" ];
nativeCheckInputs = [
anyio
pytestCheckHook
];
pythonImportsCheck = [
"aiomqtt"
];
pytestFlagsArray = [
"-m" "'not network'"
];
@ -60,7 +50,7 @@ buildPythonPackage rec {
meta = with lib; {
description = "The idiomatic asyncio MQTT client, wrapped around paho-mqtt";
homepage = "https://github.com/sbtinstruments/aiomqtt";
changelog = "https://github.com/sbtinstruments/aiomqtt/blob/${src.rev}/CHANGELOG.md";
changelog = "https://github.com/sbtinstruments/aiomqtt/blob/${version}/CHANGELOG.md";
license = licenses.bsd3;
maintainers = with maintainers; [ ];
};