about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2019-10-22 14:38:03 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2019-10-22 14:38:03 +0200
commit4ca7e3d75f72d901667d18c491df213ee18126ab (patch)
tree4d297e97a88623d5c4159da0e870a0fdd37032e2
parent12fd773ff058755237ebafe5f1c0bdd36f385eb6 (diff)
downloadnixlib-4ca7e3d75f72d901667d18c491df213ee18126ab.tar
nixlib-4ca7e3d75f72d901667d18c491df213ee18126ab.tar.gz
nixlib-4ca7e3d75f72d901667d18c491df213ee18126ab.tar.bz2
nixlib-4ca7e3d75f72d901667d18c491df213ee18126ab.tar.lz
nixlib-4ca7e3d75f72d901667d18c491df213ee18126ab.tar.xz
nixlib-4ca7e3d75f72d901667d18c491df213ee18126ab.tar.zst
nixlib-4ca7e3d75f72d901667d18c491df213ee18126ab.zip
python.pkgs.sqlalchemy: support sqlite 3.30
-rw-r--r--pkgs/development/python-modules/sqlalchemy/default.nix27
1 files changed, 20 insertions, 7 deletions
diff --git a/pkgs/development/python-modules/sqlalchemy/default.nix b/pkgs/development/python-modules/sqlalchemy/default.nix
index f1c570d34f94..e9e14b7da4d8 100644
--- a/pkgs/development/python-modules/sqlalchemy/default.nix
+++ b/pkgs/development/python-modules/sqlalchemy/default.nix
@@ -1,7 +1,8 @@
 { lib, fetchPypi, buildPythonPackage, isPy3k, isPy35
 , mock
 , pysqlite
-, pytest
+, fetchpatch
+, pytestCheckHook
 }:
 
 buildPythonPackage rec {
@@ -14,7 +15,7 @@ buildPythonPackage rec {
   };
 
   checkInputs = [
-    pytest
+    pytestCheckHook
     mock
   ] ++ lib.optional (!isPy3k) pysqlite;
 
@@ -22,11 +23,23 @@ buildPythonPackage rec {
     sed -e 's:--max-worker-restart=5::g' -i setup.cfg
   '';
 
-  checkPhase = if isPy35 then ''
-    pytest test -k 'not exception_persistent_flush_py3k'
-  '' else ''
-    pytest test
-  '';
+  dontUseSetuptoolsCheck = true;
+
+  disabledTests = lib.optionals isPy35 [ "exception_persistent_flush_py3k "];
+
+  patches = [
+    # Two patches for sqlite 3.30 compatibility.
+    # https://github.com/sqlalchemy/sqlalchemy/pull/4921
+    (fetchpatch {
+      url = https://github.com/sqlalchemy/sqlalchemy/commit/8b35ba54ab31aab13a34c360a31d014da1f5c809.patch;
+      sha256 = "065csr6pd7j1fjnv72wbz8s6xhydi5f161gj7nyqq86rxkh0nl0n";
+    })
+    (fetchpatch {
+      url = https://github.com/sqlalchemy/sqlalchemy/commit/e18534a9045786efdaf4963515222838c62e0300.patch;
+      sha256 = "0bwfwp5gmgg12qilvwdd2a5xi76bllzzapb23ybh1k34c5pla195";
+    })
+
+  ];
 
   meta = with lib; {
     homepage = http://www.sqlalchemy.org/;