about summary refs log tree commit diff
path: root/pkgs/development/python-modules/apsw/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/apsw/default.nix')
-rw-r--r--pkgs/development/python-modules/apsw/default.nix27
1 files changed, 17 insertions, 10 deletions
diff --git a/pkgs/development/python-modules/apsw/default.nix b/pkgs/development/python-modules/apsw/default.nix
index 41eb2ade77eda..d2effb1ae435f 100644
--- a/pkgs/development/python-modules/apsw/default.nix
+++ b/pkgs/development/python-modules/apsw/default.nix
@@ -1,16 +1,17 @@
 {
+  stdenv,
   lib,
   buildPythonPackage,
   fetchFromGitHub,
-  python,
   pythonOlder,
+  pytestCheckHook,
   setuptools,
   sqlite,
 }:
 
 buildPythonPackage rec {
   pname = "apsw";
-  version = "3.45.3.0";
+  version = "3.46.1.0";
   pyproject = true;
 
   disabled = pythonOlder "3.8";
@@ -19,26 +20,32 @@ buildPythonPackage rec {
     owner = "rogerbinns";
     repo = "apsw";
     rev = "refs/tags/${version}";
-    hash = "sha256-7z9JXJn2a6RJAc+7KrkzzScrNmbb06ud6L1rBinzkP8=";
+    hash = "sha256-/MMCwdd2juFbv/lrYwuO2mdWm0+v+YFn6h9CwdQMTpg=";
   };
 
   build-system = [ setuptools ];
 
   buildInputs = [ sqlite ];
 
+  nativeCheckInputs = [ pytestCheckHook ];
 
-  # Project uses custom test setup to exclude some tests by default, so using pytest
-  # requires more maintenance
-  # https://github.com/rogerbinns/apsw/issues/335
-  checkPhase = ''
-    ${python.interpreter} setup.py test
-  '';
+  pytestFlagsArray = [ "apsw/tests.py" ];
+
+  disabledTests = [
+    # we don't build the test extension
+    "testLoadExtension"
+    "testShell"
+    "testVFS"
+    "testVFSWithWAL"
+    # no lines in errout.txt
+    "testWriteUnraisable"
+  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "testzzForkChecker" ];
 
   pythonImportsCheck = [ "apsw" ];
 
   meta = with lib; {
     changelog = "https://github.com/rogerbinns/apsw/blob/${src.rev}/doc/changes.rst";
-    description = "A Python wrapper for the SQLite embedded relational database engine";
+    description = "Python wrapper for the SQLite embedded relational database engine";
     homepage = "https://github.com/rogerbinns/apsw";
     license = licenses.zlib;
     maintainers = with maintainers; [ gador ];