2021-06-28 23:13:55 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchPypi
|
|
|
|
, buildPythonPackage
|
|
|
|
, isPy3k
|
|
|
|
, pythonOlder
|
|
|
|
, greenlet
|
|
|
|
, importlib-metadata
|
2020-04-24 23:36:52 +00:00
|
|
|
, mock
|
2021-04-26 19:14:03 +00:00
|
|
|
, pysqlite ? null
|
2020-04-24 23:36:52 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "SQLAlchemy";
|
2022-09-09 14:08:57 +00:00
|
|
|
version = "1.4.40";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-09-09 14:08:57 +00:00
|
|
|
hash = "sha256-RKZgUGCAzJdeHfpXdv5fYxXdxiane1C/Du4YsDieomU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
greenlet
|
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
importlib-metadata
|
2021-03-09 03:18:52 +00:00
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
mock
|
|
|
|
] ++ lib.optional (!isPy3k) pysqlite;
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
sed -e 's:--max-worker-restart=5::g' -i setup.cfg
|
|
|
|
'';
|
|
|
|
|
|
|
|
# disable mem-usage tests on mac, has trouble serializing pickle files
|
2021-06-28 23:13:55 +00:00
|
|
|
disabledTests = lib.optionals stdenv.isDarwin [
|
|
|
|
"MemUsageWBackendTest"
|
|
|
|
"MemUsageTest"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "http://www.sqlalchemy.org/";
|
|
|
|
description = "A Python SQL toolkit and Object Relational Mapper";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|