depot/third_party/nixpkgs/pkgs/development/python-modules/databases/default.nix
Default email 8349aecef1 Project import generated by Copybara.
GitOrigin-RevId: 9bf75dd50b7b6d3ce6aaf6563db95f41438b9bdb
2021-10-09 16:59:57 +02:00

54 lines
1 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, sqlalchemy
, aiocontextvars
, isPy27
, pytestCheckHook
, pymysql
, asyncpg
, aiomysql
, aiosqlite
}:
buildPythonPackage rec {
pname = "databases";
version = "0.5.2";
disabled = isPy27;
src = fetchFromGitHub {
owner = "encode";
repo = pname;
rev = version;
sha256 = "sha256-OfBb78lKnAxPhyy2j4TzEZWBzbw64brTQcxuOPoW9pk=";
};
propagatedBuildInputs = [
aiocontextvars
sqlalchemy
];
checkInputs = [
aiomysql
aiosqlite
asyncpg
pymysql
pytestCheckHook
];
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"
];
meta = with lib; {
description = "Async database support for Python";
homepage = "https://github.com/encode/databases";
license = licenses.bsd3;
maintainers = [ maintainers.costrouc ];
};
}