summary refs log tree commit diff
path: root/pkgs/development/python-modules/amazon_kclpy/default.nix
blob: a405b575b2538122b14ef7c660af81865ac5b752 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ stdenv, buildPythonPackage, fetchFromGitHub, python, mock, boto, pytest }:

buildPythonPackage rec {
  pname = "amazon_kclpy";
  version = "1.5.0";

  src = fetchFromGitHub {
    owner = "awslabs";
    repo = "amazon-kinesis-client-python";
    rev = "v${version}";
    sha256 = "1qg86y9172gm5592ja7lr6w7kfnx668j99bf3ijklpk5yshxwr9m";
  };

  # argparse is just required for python2.6
  prePatch = ''
    substituteInPlace setup.py \
      --replace "'argparse'," ""
  '';

  propagatedBuildInputs =  [ mock boto ];

  checkInputs = [ pytest ];

  checkPhase = ''
    ${python.interpreter} -m pytest
  '';

  meta = with stdenv.lib; {
    description = "Amazon Kinesis Client Library for Python";
    homepage = https://github.com/awslabs/amazon-kinesis-client-python;
    license = licenses.amazonsl;
    maintainers = with maintainers; [ psyanticy ];
  };
}