Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at flake-libs 59 lines 1.7 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchPypi, 6 pytestCheckHook, 7 pythonAtLeast, 8 pythonOlder, 9 setuptools, 10 legacy-cgi, 11}: 12 13buildPythonPackage rec { 14 pname = "pydal"; 15 version = "20250501.2"; 16 pyproject = true; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchPypi { 21 inherit pname version; 22 hash = "sha256-WCF6pzYMf1EWM58oGOitXHldJj9RMqrD8Sy8THqfzT0="; 23 }; 24 25 build-system = [ setuptools ]; 26 27 nativeCheckInputs = [ pytestCheckHook ]; 28 29 checkInputs = lib.optionals (pythonAtLeast "3.13") [ legacy-cgi ]; 30 31 pytestFlagsArray = [ 32 "tests/*.py" 33 # these tests already seem to be broken on the upstream 34 "--deselect=tests/nosql.py::TestFields::testRun" 35 "--deselect=tests/nosql.py::TestSelect::testGroupByAndDistinct" 36 "--deselect=tests/nosql.py::TestExpressions::testOps" 37 "--deselect=tests/nosql.py::TestExpressions::testRun" 38 "--deselect=tests/nosql.py::TestImportExportUuidFields::testRun" 39 "--deselect=tests/nosql.py::TestConnection::testRun" 40 "--deselect=tests/restapi.py::TestRestAPI::test_search" 41 "--deselect=tests/validation.py::TestValidateAndInsert::testRun" 42 "--deselect=tests/validation.py::TestValidateUpdateInsert::testRun" 43 "--deselect=tests/validators.py::TestValidators::test_IS_IN_DB" 44 ]; 45 46 disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ 47 # socket.gaierror: [Errno 8] nodename nor servname provided, or not known 48 "test_scheduler" 49 ]; 50 51 pythonImportsCheck = [ "pydal" ]; 52 53 meta = with lib; { 54 description = "Python Database Abstraction Layer"; 55 homepage = "https://github.com/web2py/pydal"; 56 license = with licenses; [ bsd3 ]; 57 maintainers = with maintainers; [ wamserma ]; 58 }; 59}