2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, sqlalchemy
|
|
|
|
, aiocontextvars
|
2021-10-17 09:34:42 +00:00
|
|
|
, aiopg
|
|
|
|
, pythonOlder
|
2021-05-20 23:08:51 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pymysql
|
2020-04-24 23:36:52 +00:00
|
|
|
, asyncpg
|
|
|
|
, aiomysql
|
|
|
|
, aiosqlite
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "databases";
|
2021-10-17 09:34:42 +00:00
|
|
|
version = "0.5.3";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "encode";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-10-17 09:34:42 +00:00
|
|
|
sha256 = "sha256-67ykx7HKGgRvJ+GRVEI/e2+x51kfHHFjh/iI4tY+6aE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2021-10-17 09:34:42 +00:00
|
|
|
aiopg
|
2020-04-24 23:36:52 +00:00
|
|
|
aiomysql
|
|
|
|
aiosqlite
|
2021-05-20 23:08:51 +00:00
|
|
|
asyncpg
|
|
|
|
pymysql
|
2021-10-17 09:34:42 +00:00
|
|
|
sqlalchemy
|
|
|
|
] ++ lib.optionals (pythonOlder "3.7") [
|
|
|
|
aiocontextvars
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
2021-05-20 23:08:51 +00:00
|
|
|
pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# circular dependency on starlette
|
|
|
|
"tests/test_integration.py"
|
|
|
|
# TEST_DATABASE_URLS is not set.
|
|
|
|
"tests/test_databases.py"
|
2021-10-17 09:34:42 +00:00
|
|
|
"tests/test_connection_options.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"databases"
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Async database support for Python";
|
|
|
|
homepage = "https://github.com/encode/databases";
|
|
|
|
license = licenses.bsd3;
|
2021-10-17 09:34:42 +00:00
|
|
|
maintainers = with maintainers; [ costrouc ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|