2021-05-05 21:53:47 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchPypi
|
|
|
|
, buildPythonPackage
|
|
|
|
, isPy3k
|
|
|
|
, pythonOlder
|
|
|
|
, greenlet
|
|
|
|
, importlib-metadata
|
2017-05-27 12:05:39 +00:00
|
|
|
, mock
|
2021-03-24 16:45:56 +00:00
|
|
|
, pysqlite ? null
|
2019-10-22 12:38:03 +00:00
|
|
|
, pytestCheckHook
|
2017-05-27 12:05:39 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "SQLAlchemy";
|
2022-04-27 16:35:48 +00:00
|
|
|
version = "1.4.36";
|
2017-05-27 12:05:39 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-04-27 16:35:48 +00:00
|
|
|
hash = "sha256-ZGeKwyHWSkWQHvLiRyXsXng/H0pYgwXhlkMUR+es4kM=";
|
2017-05-27 12:05:39 +00:00
|
|
|
};
|
|
|
|
|
2021-05-05 21:53:47 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
greenlet
|
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
importlib-metadata
|
2021-02-23 19:00:45 +00:00
|
|
|
];
|
|
|
|
|
2017-08-25 17:03:41 +00:00
|
|
|
checkInputs = [
|
2019-10-22 12:38:03 +00:00
|
|
|
pytestCheckHook
|
2017-08-25 17:03:41 +00:00
|
|
|
mock
|
|
|
|
] ++ lib.optional (!isPy3k) pysqlite;
|
2017-05-27 12:05:39 +00:00
|
|
|
|
2019-07-16 23:24:12 +00:00
|
|
|
postInstall = ''
|
|
|
|
sed -e 's:--max-worker-restart=5::g' -i setup.cfg
|
|
|
|
'';
|
|
|
|
|
2019-11-11 21:08:58 +00:00
|
|
|
# disable mem-usage tests on mac, has trouble serializing pickle files
|
2021-05-05 21:53:47 +00:00
|
|
|
disabledTests = lib.optionals stdenv.isDarwin [
|
|
|
|
"MemUsageWBackendTest"
|
|
|
|
"MemUsageTest"
|
|
|
|
];
|
2019-10-22 12:38:03 +00:00
|
|
|
|
2017-05-27 12:05:39 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://www.sqlalchemy.org/";
|
2017-05-27 12:05:39 +00:00
|
|
|
description = "A Python SQL toolkit and Object Relational Mapper";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
2018-11-06 05:19:19 +00:00
|
|
|
}
|