1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 python,
6 mock,
7 boto,
8 pytest,
9}:
10
11buildPythonPackage rec {
12 pname = "amazon-kclpy";
13 version = "2.1.3";
14 format = "setuptools";
15
16 src = fetchFromGitHub {
17 owner = "awslabs";
18 repo = "amazon-kinesis-client-python";
19 rev = "refs/tags/v${version}";
20 hash = "sha256-3BhccRJd6quElXZSix1aVIqWr9wdcTTziDhnIOLiPPo=";
21 };
22
23 # argparse is just required for python2.6
24 prePatch = ''
25 substituteInPlace setup.py \
26 --replace "'argparse'," ""
27 '';
28
29 propagatedBuildInputs = [
30 mock
31 boto
32 ];
33
34 nativeCheckInputs = [ pytest ];
35
36 checkPhase = ''
37 ${python.interpreter} -m pytest
38 '';
39
40 meta = with lib; {
41 description = "Amazon Kinesis Client Library for Python";
42 homepage = "https://github.com/awslabs/amazon-kinesis-client-python";
43 license = licenses.amazonsl;
44 maintainers = with maintainers; [ psyanticy ];
45 };
46}