1{ 2 lib, 3 aiomysql, 4 aiopg, 5 aiosqlite, 6 asyncmy, 7 asyncpg, 8 buildPythonPackage, 9 fetchFromGitHub, 10 pytestCheckHook, 11 pythonOlder, 12 setuptools, 13 sqlalchemy, 14}: 15 16buildPythonPackage rec { 17 pname = "databases"; 18 version = "0.9.0"; 19 pyproject = true; 20 21 disabled = pythonOlder "3.8"; 22 23 src = fetchFromGitHub { 24 owner = "encode"; 25 repo = "databases"; 26 tag = version; 27 hash = "sha256-Zf9QqBgDhWAnHdNvzjXtri5rdT00BOjc4YTNzJALldM="; 28 }; 29 30 nativeBuildInputs = [ setuptools ]; 31 32 propagatedBuildInputs = [ sqlalchemy ]; 33 34 optional-dependencies = { 35 postgresql = [ asyncpg ]; 36 asyncpg = [ asyncpg ]; 37 aiopg = [ aiopg ]; 38 mysql = [ aiomysql ]; 39 aiomysql = [ aiomysql ]; 40 asyncmy = [ asyncmy ]; 41 sqlite = [ aiosqlite ]; 42 aiosqlite = [ aiosqlite ]; 43 }; 44 45 nativeCheckInputs = [ pytestCheckHook ]; 46 47 disabledTestPaths = [ 48 # circular dependency on starlette 49 "tests/test_integration.py" 50 # TEST_DATABASE_URLS is not set. 51 "tests/test_databases.py" 52 "tests/test_connection_options.py" 53 ]; 54 55 pythonImportsCheck = [ "databases" ]; 56 57 meta = with lib; { 58 description = "Async database support for Python"; 59 homepage = "https://github.com/encode/databases"; 60 changelog = "https://github.com/encode/databases/releases/tag/${version}"; 61 license = licenses.bsd3; 62 maintainers = [ ]; 63 }; 64}