2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, sqlalchemy
|
|
|
|
, aiocontextvars
|
|
|
|
, isPy27
|
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-09 14:59:57 +00:00
|
|
|
version = "0.5.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
disabled = isPy27;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "encode";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-10-09 14:59:57 +00:00
|
|
|
sha256 = "sha256-OfBb78lKnAxPhyy2j4TzEZWBzbw64brTQcxuOPoW9pk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiocontextvars
|
2021-05-20 23:08:51 +00:00
|
|
|
sqlalchemy
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
aiomysql
|
|
|
|
aiosqlite
|
2021-05-20 23:08:51 +00:00
|
|
|
asyncpg
|
|
|
|
pymysql
|
|
|
|
pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# ModuleNotFoundError: No module named 'aiopg'
|
|
|
|
"tests/test_connection_options.py"
|
|
|
|
# circular dependency on starlette
|
|
|
|
"tests/test_integration.py"
|
|
|
|
# TEST_DATABASE_URLS is not set.
|
|
|
|
"tests/test_databases.py"
|
|
|
|
];
|
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;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|