1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, sqlalchemy 5, aiocontextvars 6, aiopg 7, pythonOlder 8, pytestCheckHook 9, pymysql 10, asyncpg 11, aiomysql 12, aiosqlite 13}: 14 15buildPythonPackage rec { 16 pname = "databases"; 17 version = "0.6.1"; 18 format = "setuptools"; 19 20 disabled = pythonOlder "3.6"; 21 22 src = fetchFromGitHub { 23 owner = "encode"; 24 repo = pname; 25 rev = version; 26 hash = "sha256-kHsA9XpolGmtuAGzRTj61igooLG9/LBQyv7TtuqiJ/A="; 27 }; 28 29 propagatedBuildInputs = [ 30 aiopg 31 aiomysql 32 aiosqlite 33 asyncpg 34 pymysql 35 sqlalchemy 36 ] ++ lib.optionals (pythonOlder "3.7") [ 37 aiocontextvars 38 ]; 39 40 checkInputs = [ 41 pytestCheckHook 42 ]; 43 44 disabledTestPaths = [ 45 # circular dependency on starlette 46 "tests/test_integration.py" 47 # TEST_DATABASE_URLS is not set. 48 "tests/test_databases.py" 49 "tests/test_connection_options.py" 50 ]; 51 52 pythonImportsCheck = [ 53 "databases" 54 ]; 55 56 meta = with lib; { 57 description = "Async database support for Python"; 58 homepage = "https://github.com/encode/databases"; 59 license = licenses.bsd3; 60 maintainers = with maintainers; [ costrouc ]; 61 }; 62}