1{ lib, buildPythonPackage, fetchFromGitHub, isPy3k
2, stdenv, pytestrunner, pytest, mock }:
3
4buildPythonPackage rec {
5 pname = "paho-mqtt";
6 version = "1.5.1";
7
8 # No tests in PyPI tarball
9 src = fetchFromGitHub {
10 owner = "eclipse";
11 repo = "paho.mqtt.python";
12 rev = "v${version}";
13 sha256 = "1y537i6zxkjkmi80w5rvd18npz1jm5246i2x8p3q7ycx94i8ixs0";
14 };
15
16 postPatch = ''
17 substituteInPlace setup.py --replace "pylama" ""
18 substituteInPlace setup.cfg --replace "--pylama" ""
19 '';
20
21 checkInputs = [ pytestrunner pytest ] ++ lib.optional (!isPy3k) mock;
22
23 doCheck = !stdenv.isDarwin;
24
25 meta = with lib; {
26 homepage = "https://eclipse.org/paho";
27 description = "MQTT version 3.1.1 client class";
28 license = licenses.epl10;
29 maintainers = with maintainers; [ mog dotlambda ];
30 };
31}