about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/prance/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/prance/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/prance/default.nix25
1 files changed, 17 insertions, 8 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/prance/default.nix b/nixpkgs/pkgs/development/python-modules/prance/default.nix
index 758cd0a78464..f9d5b6f80b1f 100644
--- a/nixpkgs/pkgs/development/python-modules/prance/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/prance/default.nix
@@ -6,20 +6,19 @@
 , requests
 , six
 , semver
-, pytest
+, pytestCheckHook
 , pytestcov
 , pytestrunner
-, sphinx
 , openapi-spec-validator
 }:
 
 buildPythonPackage rec {
   pname = "prance";
-  version = "0.20.0";
+  version = "0.20.2";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "f7e98b0f7e8ef0dd581c40d8a3e869e15e74b08026b862c3212447f8aa2426a7";
+    sha256 = "4ffcddae6218cf6753a02af36ca9fb1c92eec4689441789ee2e9963230882388";
   };
 
   buildInputs = [
@@ -35,18 +34,28 @@ buildPythonPackage rec {
   ];
 
   checkInputs = [
-    pytest
+    pytestCheckHook
     pytestcov
     openapi-spec-validator
   ];
 
   postPatch = ''
     substituteInPlace setup.py \
-      --replace "tests_require = dev_require," "tests_require = None,"
+      --replace "tests_require = dev_require," "tests_require = None," \
+      --replace "chardet~=4.0" "" \
+      --replace "semver~=2.13" ""
+    substituteInPlace setup.cfg \
+      --replace "--cov-fail-under=90" ""
   '';
 
-  # many tests require network connection
-  doCheck = false;
+  # Disable tests that require network
+  disabledTestPaths = [
+    "tests/test_convert.py"
+  ];
+  disabledTests = [
+    "test_fetch_url_http"
+  ];
+  pythonImportsCheck = [ "prance" ];
 
   meta = with lib; {
     description = "Resolving Swagger/OpenAPI 2.0 and 3.0.0 Parser";