1{ lib, fetchFromGitHub, buildPythonPackage, pythonOlder,
2cython, numpy, pytest, requests-toolbelt }:
3
4buildPythonPackage rec {
5 pname = "streaming-form-data";
6 version = "1.8.1";
7 disabled = pythonOlder "3.6";
8
9 src = fetchFromGitHub {
10 owner = "siddhantgoel";
11 repo = "streaming-form-data";
12 rev = "v${version}";
13 sha256 = "1wnak8gwkc42ihgf0g9r7r858hxbqav2xdgqa8azid8v2ff6iq4d";
14 };
15
16 nativeBuildInputs = [ cython ];
17
18 propagatedBuildInputs = [ requests-toolbelt ];
19
20 checkInputs = [ numpy pytest ];
21
22 checkPhase = ''
23 make test
24 '';
25
26 pythonImportsCheck = [ "streaming_form_data" ];
27
28 meta = with lib; {
29 description = "Streaming parser for multipart/form-data";
30 homepage = "https://github.com/siddhantgoel/streaming-form-data";
31 license = licenses.mit;
32 maintainers = with maintainers; [ zhaofengli ];
33 };
34}