2017-12-12 08:48:10 +01:00
|
|
|
{ stdenv, buildPythonPackage, fetchPypi, pytest, six, mock }:
|
2017-12-11 18:41:20 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
name = "${pname}-${version}";
|
2018-02-26 18:45:37 +01:00
|
|
|
version = "1.4.1";
|
2017-12-11 18:41:20 +01:00
|
|
|
pname = "kafka-python";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-02-26 18:45:37 +01:00
|
|
|
sha256 = "596e9b4e302a0dc04d35be159cf23d31c4cba73a218e16fc8cd1be0ad57f8c22";
|
2017-12-11 18:41:20 +01:00
|
|
|
};
|
|
|
|
|
2017-12-12 08:48:10 +01:00
|
|
|
checkInputs = [ pytest six mock ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
py.test
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Upstream uses tox but we don't on Nix. Running tests manually produces however
|
|
|
|
# from . import unittest
|
|
|
|
# E ImportError: cannot import name 'unittest'
|
|
|
|
doCheck = false;
|
2017-12-11 18:41:20 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Pure Python client for Apache Kafka";
|
|
|
|
homepage = https://github.com/dpkp/kafka-python;
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
};
|
|
|
|
}
|