blob: 8c631510ec430b1799d75a49e4589a308cdd102b (
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
35
36
37
38
|
{ lib, fetchFromGitHub, buildPythonPackage, pythonOlder,
cython, smart-open, pytestCheckHook, moto, requests-toolbelt }:
buildPythonPackage rec {
pname = "streaming-form-data";
version = "1.13.0";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "siddhantgoel";
repo = "streaming-form-data";
rev = "v${version}";
hash = "sha256-Ntiad5GZtfRd+2uDPgbDzLBzErGFroffK6ZAmMcsfXA=";
};
nativeBuildInputs = [ cython ];
propagatedBuildInputs = [ smart-open ];
nativeCheckInputs = [ pytestCheckHook moto requests-toolbelt ];
pytestFlagsArray = [ "tests" ];
pythonImportsCheck = [ "streaming_form_data" ];
preCheck = ''
# remove in-tree copy to make pytest find the installed one, with the native parts already built
rm -rf 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 ];
};
}
|