depot/third_party/nixpkgs/pkgs/development/python-modules/paho-mqtt/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

31 lines
817 B
Nix

{ lib, buildPythonPackage, fetchFromGitHub, isPy3k
, stdenv, pytestrunner, pytest, mock }:
buildPythonPackage rec {
pname = "paho-mqtt";
version = "1.5.0";
# No tests in PyPI tarball
src = fetchFromGitHub {
owner = "eclipse";
repo = "paho.mqtt.python";
rev = "v${version}";
sha256 = "1fq5z53g2k18iiqnz5qq87vzjpppfza072nx0dwllmhimm2dskh5";
};
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 ];
};
}