2019-12-29 18:05:18 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, sqlalchemy
|
|
|
|
, aiocontextvars
|
|
|
|
, isPy27
|
2021-05-07 23:56:03 +01:00
|
|
|
, pytestCheckHook
|
|
|
|
, pymysql
|
2019-12-29 18:05:18 +00:00
|
|
|
, asyncpg
|
|
|
|
, aiomysql
|
|
|
|
, aiosqlite
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "databases";
|
2021-05-07 23:56:03 +01:00
|
|
|
version = "0.4.3";
|
2019-12-29 18:05:18 +00:00
|
|
|
disabled = isPy27;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "encode";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-05-07 23:56:03 +01:00
|
|
|
sha256 = "0aq88k7d9036cy6qvlfv9p2dxd6p6fic3j0az43gn6k1ardhdsgf";
|
2019-12-29 18:05:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiocontextvars
|
2021-05-07 23:56:03 +01:00
|
|
|
sqlalchemy
|
2019-12-29 18:05:18 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
aiomysql
|
|
|
|
aiosqlite
|
2021-05-07 23:56:03 +01:00
|
|
|
asyncpg
|
|
|
|
pymysql
|
|
|
|
pytestCheckHook
|
2019-12-29 18:05:18 +00:00
|
|
|
];
|
|
|
|
|
2021-05-07 23:56:03 +01: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"
|
|
|
|
];
|
2019-12-29 18:05:18 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Async database support for Python";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/encode/databases";
|
2019-12-29 18:05:18 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|