about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pydal/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-10-20 22:09:03 +0000
committerAlyssa Ross <hi@alyssa.is>2023-10-20 22:09:03 +0000
commit50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e (patch)
treef2556b911180125ccbb7ed0e78a54e92da89adce /nixpkgs/pkgs/development/python-modules/pydal/default.nix
parent4c16d4548a98563c9d9ad76f4e5b2202864ccd54 (diff)
parentcfc75eec4603c06503ae750f88cf397e00796ea8 (diff)
downloadnixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar
nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.gz
nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.bz2
nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.lz
nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.xz
nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.zst
nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.zip
Merge commit 'cfc75eec4603c06503ae750f88cf397e00796ea8'
Conflicts:
	nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pydal/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/pydal/default.nix54
1 files changed, 31 insertions, 23 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pydal/default.nix b/nixpkgs/pkgs/development/python-modules/pydal/default.nix
index b5de4635b47e..18fd4dc70b4a 100644
--- a/nixpkgs/pkgs/development/python-modules/pydal/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/pydal/default.nix
@@ -1,38 +1,46 @@
 { lib
 , buildPythonPackage
 , fetchPypi
-, python
+, pytestCheckHook
+, pythonOlder
+, setuptools
 }:
 
 buildPythonPackage rec {
   pname = "pydal";
-  version = "20221110.1";
-  format = "setuptools";
+  version = "20230521.1";
+  format = "pyproject";
+
+  disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    hash = "sha256-fD6JHHD42JGONidvIQoZWbt7rfOydvRxkZhv/PW2o5A=";
+    hash = "sha256-EEeKYeYnxbjLdpH39+v3IQhFSFMWST0310DCl/ttGEU=";
   };
 
-  postPatch = ''
-    # this test has issues with an import statement
-    # rm tests/tags.py
-    sed -i '/from .tags import/d' tests/__init__.py
-
-    # this assertion errors without obvious reason
-    sed -i '/self.assertEqual(csv0, str(r4))/d' tests/caching.py
-
-    # some sql tests fail against sqlite engine
-    sed -i '/from .sql import/d' tests/__init__.py
-  '';
-
-  pythonImportsCheck = [ "pydal" ];
-
-  checkPhase = ''
-    runHook preCheck
-    ${python.interpreter} -m unittest tests
-    runHook postCheck
-  '';
+  nativeBuildInputs = [
+    setuptools
+  ];
+
+  nativeCheckInputs = [
+    pytestCheckHook
+  ];
+
+  pytestFlagsArray = [
+    "tests/*.py"
+    # these tests already seem to be broken on the upstream
+    "--deselect=tests/nosql.py::TestFields::testRun"
+    "--deselect=tests/nosql.py::TestSelect::testGroupByAndDistinct"
+    "--deselect=tests/nosql.py::TestExpressions::testOps"
+    "--deselect=tests/nosql.py::TestExpressions::testRun"
+    "--deselect=tests/nosql.py::TestImportExportUuidFields::testRun"
+    "--deselect=tests/nosql.py::TestConnection::testRun"
+    "--deselect=tests/validation.py::TestValidateAndInsert::testRun"
+    "--deselect=tests/validation.py::TestValidateUpdateInsert::testRun"
+    "--deselect=tests/validators.py::TestValidators::test_IS_IN_DB"
+  ];
+
+  pythonImportsCheck = ["pydal"];
 
   meta = with lib; {
     description = "Python Database Abstraction Layer";