11 buildPythonPackage rec {
12 pname = "streaming-form-data";
14 format = "setuptools";
15 disabled = pythonOlder "3.6";
17 src = fetchFromGitHub {
18 owner = "siddhantgoel";
19 repo = "streaming-form-data";
21 hash = "sha256-Ntiad5GZtfRd+2uDPgbDzLBzErGFroffK6ZAmMcsfXA=";
24 # streaming-form-data has a small bit of code that uses smart_open, which has a massive closure.
25 # The only consumer of streaming-form-data is Moonraker, which doesn't use that code.
26 # So, just drop the dependency to not have to deal with it.
27 patches = [ ./drop-smart-open.patch ];
29 nativeBuildInputs = [ cython ];
36 pytestFlagsArray = [ "tests" ];
38 pythonImportsCheck = [ "streaming_form_data" ];
41 # remove in-tree copy to make pytest find the installed one, with the native parts already built
42 rm -rf streaming_form_data
46 description = "Streaming parser for multipart/form-data";
47 homepage = "https://github.com/siddhantgoel/streaming-form-data";
48 license = licenses.mit;
49 maintainers = with maintainers; [ zhaofengli ];