depot/third_party/nixpkgs/pkgs/development/python-modules/paho-mqtt/default.nix
Default email ffc78d3539 Project import generated by Copybara.
GitOrigin-RevId: d9dba88d08a9cdf483c3d45f0d7220cf97a4ce64
2021-01-05 19:05:55 +02:00

31 lines
817 B
Nix

{ lib, buildPythonPackage, fetchFromGitHub, isPy3k
, stdenv, pytestrunner, pytest, mock }:
buildPythonPackage rec {
pname = "paho-mqtt";
version = "1.5.1";
# No tests in PyPI tarball
src = fetchFromGitHub {
owner = "eclipse";
repo = "paho.mqtt.python";
rev = "v${version}";
sha256 = "1y537i6zxkjkmi80w5rvd18npz1jm5246i2x8p3q7ycx94i8ixs0";
};
postPatch = ''
substituteInPlace setup.py --replace "pylama" ""
substituteInPlace setup.cfg --replace "--pylama" ""
'';
checkInputs = [ pytestrunner pytest ] ++ lib.optional (!isPy3k) mock;
doCheck = !stdenv.isDarwin;
meta = with lib; {
homepage = "https://eclipse.org/paho";
description = "MQTT version 3.1.1 client class";
license = licenses.epl10;
maintainers = with maintainers; [ mog dotlambda ];
};
}