about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/csvw/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/csvw/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/csvw/default.nix23
1 files changed, 17 insertions, 6 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/csvw/default.nix b/nixpkgs/pkgs/development/python-modules/csvw/default.nix
index 67342d9eccc8..7ae79f4ec59f 100644
--- a/nixpkgs/pkgs/development/python-modules/csvw/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/csvw/default.nix
@@ -1,13 +1,13 @@
 { lib
 , buildPythonPackage
 , fetchFromGitHub
+, pythonAtLeast
 , pythonOlder
 , attrs
 , isodate
 , python-dateutil
 , rfc3986
 , uritemplate
-, mock
 , pytestCheckHook
 , pytest-mock
 }:
@@ -15,6 +15,8 @@
 buildPythonPackage rec {
   pname = "csvw";
   version = "1.11.0";
+  format = "setuptools";
+
   disabled = pythonOlder "3.6";
 
   src = fetchFromGitHub {
@@ -24,10 +26,6 @@ buildPythonPackage rec {
     sha256 = "1393xwqawaxsflbq62vks92vv4zch8p6dd1mdvdi7j4vvf0zljkg";
   };
 
-  patchPhase = ''
-    substituteInPlace setup.cfg --replace "--cov" ""
-  '';
-
   propagatedBuildInputs = [
     attrs
     isodate
@@ -37,15 +35,28 @@ buildPythonPackage rec {
   ];
 
   checkInputs = [
-    mock
     pytestCheckHook
     pytest-mock
   ];
 
+  patchPhase = ''
+    substituteInPlace setup.cfg \
+      --replace "--cov" ""
+  '';
+
   disabledTests = [
     # this test is flaky on darwin because it depends on the resolution of filesystem mtimes
     # https://github.com/cldf/csvw/blob/45584ad63ff3002a9b3a8073607c1847c5cbac58/tests/test_db.py#L257
     "test_write_file_exists"
+  ] ++ lib.optionals (pythonAtLeast "3.10") [
+    # https://github.com/cldf/csvw/issues/58
+    "test_roundtrip_escapechar"
+    "test_escapequote_escapecharquotechar_final"
+    "test_doubleQuote"
+  ];
+
+  pythonImportsCheck = [
+    "csvw"
   ];
 
   meta = with lib; {