summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorK900 <me@0upti.me>2023-10-22 12:52:57 +0300
committerK900 <me@0upti.me>2023-10-22 16:42:58 +0300
commit010d33ac5a448eb400e602564fe3bfd0d7cdecca (patch)
tree5f3dcade4afa0b3aca282ae8586a7973d4081eac /pkgs/development
parent23203f8e124b243a7de38cb39e744a1dc0cb0cd8 (diff)
python311Packages.streaming-form-data: 1.8.1 -> 1.13.0
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/python-modules/streaming-form-data/default.nix19
1 files changed, 11 insertions, 8 deletions
diff --git a/pkgs/development/python-modules/streaming-form-data/default.nix b/pkgs/development/python-modules/streaming-form-data/default.nix
index 959c47d8121bd..f3aa0aa281163 100644
--- a/pkgs/development/python-modules/streaming-form-data/default.nix
+++ b/pkgs/development/python-modules/streaming-form-data/default.nix
@@ -1,30 +1,33 @@
 { lib, fetchFromGitHub, buildPythonPackage, pythonOlder,
-cython, numpy, pytest, requests-toolbelt }:
+cython, smart-open, pytestCheckHook, moto, requests-toolbelt }:
 
 buildPythonPackage rec {
   pname = "streaming-form-data";
-  version = "1.8.1";
+  version = "1.13.0";
   disabled = pythonOlder "3.6";
 
   src = fetchFromGitHub {
     owner = "siddhantgoel";
     repo = "streaming-form-data";
     rev = "v${version}";
-    sha256 = "1wnak8gwkc42ihgf0g9r7r858hxbqav2xdgqa8azid8v2ff6iq4d";
+    hash = "sha256-Ntiad5GZtfRd+2uDPgbDzLBzErGFroffK6ZAmMcsfXA=";
   };
 
   nativeBuildInputs = [ cython ];
 
-  propagatedBuildInputs = [ requests-toolbelt ];
+  propagatedBuildInputs = [ smart-open ];
 
-  nativeCheckInputs = [ numpy pytest ];
+  nativeCheckInputs = [ pytestCheckHook moto requests-toolbelt ];
 
-  checkPhase = ''
-    make test
-  '';
+  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";