about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/streaming-form-data/default.nix
blob: 2f52d4aeb30893553767488f6549d0c9da5e2de4 (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
{ lib, fetchFromGitHub, buildPythonPackage, pythonOlder,
cython, numpy, pytest, requests-toolbelt }:

buildPythonPackage rec {
  pname = "streaming-form-data";
  version = "1.8.1";
  disabled = pythonOlder "3.6";

  src = fetchFromGitHub {
    owner = "siddhantgoel";
    repo = "streaming-form-data";
    rev = "v${version}";
    sha256 = "1wnak8gwkc42ihgf0g9r7r858hxbqav2xdgqa8azid8v2ff6iq4d";
  };

  nativeBuildInputs = [ cython ];

  propagatedBuildInputs = [ requests-toolbelt ];

  checkInputs = [ numpy pytest ];

  checkPhase = ''
    make test
  '';

  pythonImportsCheck = [ "streaming_form_data" ];

  meta = with lib; {
    description = "Streaming parser for multipart/form-data";
    homepage = "https://github.com/siddhantgoel/streaming-form-data";
    license = licenses.mit;
    maintainers = with maintainers; [ zhaofengli ];
  };
}