1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pytestCheckHook,
6 pythonAtLeast,
7 pythonOlder,
8 setuptools,
9 legacy-cgi,
10}:
11
12buildPythonPackage rec {
13 pname = "pydal";
14 version = "20250228.1";
15 pyproject = true;
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchPypi {
20 inherit pname version;
21 hash = "sha256-/1FeoGXGWqVL3T54w84JUys4e9heOyXWkPdWy3MSzcA=";
22 };
23
24 build-system = [ setuptools ];
25
26 nativeCheckInputs = [ pytestCheckHook ];
27
28 checkInputs = lib.optionals (pythonAtLeast "3.13") [ legacy-cgi ];
29
30 pytestFlagsArray = [
31 "tests/*.py"
32 # these tests already seem to be broken on the upstream
33 "--deselect=tests/nosql.py::TestFields::testRun"
34 "--deselect=tests/nosql.py::TestSelect::testGroupByAndDistinct"
35 "--deselect=tests/nosql.py::TestExpressions::testOps"
36 "--deselect=tests/nosql.py::TestExpressions::testRun"
37 "--deselect=tests/nosql.py::TestImportExportUuidFields::testRun"
38 "--deselect=tests/nosql.py::TestConnection::testRun"
39 "--deselect=tests/restapi.py::TestRestAPI::test_search"
40 "--deselect=tests/validation.py::TestValidateAndInsert::testRun"
41 "--deselect=tests/validation.py::TestValidateUpdateInsert::testRun"
42 "--deselect=tests/validators.py::TestValidators::test_IS_IN_DB"
43 ];
44
45 pythonImportsCheck = [ "pydal" ];
46
47 meta = with lib; {
48 description = "Python Database Abstraction Layer";
49 homepage = "https://github.com/web2py/pydal";
50 license = with licenses; [ bsd3 ];
51 maintainers = with maintainers; [ wamserma ];
52 };
53}