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";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "0.6.1";
|
2022-02-10 20:34:41 +00:00
|
|
|
format = "setuptools";
|
2021-10-17 09:34:42 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "encode";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-08-12 12:06:08 +00:00
|
|
|
hash = "sha256-kHsA9XpolGmtuAGzRTj61igooLG9/LBQyv7TtuqiJ/A=";
|
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
|
|
|
};
|
|
|
|
}
|