depot/third_party/nixpkgs/pkgs/development/python-modules/paho-mqtt/default.nix
Default email 620eecebfb Project import generated by Copybara.
GitOrigin-RevId: 2deb07f3ac4eeb5de1c12c4ba2911a2eb1f6ed61
2021-10-28 08:52:43 +02:00

47 lines
901 B
Nix

{ lib
, stdenv
, buildPythonPackage
, fetchFromGitHub
, isPy3k
, pytestCheckHook
, mock
}:
buildPythonPackage rec {
pname = "paho-mqtt";
version = "1.6.1";
src = fetchFromGitHub {
owner = "eclipse";
repo = "paho.mqtt.python";
rev = "v${version}";
sha256 = "sha256-9nH6xROVpmI+iTKXfwv2Ar1PAmWbEunI3HO0pZyK6Rg=";
};
postPatch = ''
substituteInPlace setup.py \
--replace "pylama" "" \
--replace "'pytest-runner'" ""
substituteInPlace setup.cfg \
--replace "--pylama" ""
'';
checkInputs = [
pytestCheckHook
] ++ lib.optional (!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 ];
};
}