2019-11-11 21:08:58 +00:00
|
|
|
{ stdenv, lib, fetchPypi, buildPythonPackage, isPy3k, isPy35
|
2017-05-27 13:05:39 +01:00
|
|
|
, mock
|
|
|
|
, pysqlite
|
2019-10-22 13:38:03 +01:00
|
|
|
, pytestCheckHook
|
2017-05-27 13:05:39 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "SQLAlchemy";
|
2020-07-31 09:56:47 +01:00
|
|
|
version = "1.3.18";
|
2017-05-27 13:05:39 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-07-31 09:56:47 +01:00
|
|
|
sha256 = "da2fb75f64792c1fc64c82313a00c728a7c301efe6a60b7a9fe35b16b4368ce7";
|
2017-05-27 13:05:39 +01:00
|
|
|
};
|
|
|
|
|
2017-08-25 18:03:41 +01:00
|
|
|
checkInputs = [
|
2019-10-22 13:38:03 +01:00
|
|
|
pytestCheckHook
|
2017-08-25 18:03:41 +01:00
|
|
|
mock
|
|
|
|
] ++ lib.optional (!isPy3k) pysqlite;
|
2017-05-27 13:05:39 +01:00
|
|
|
|
2019-07-17 00:24:12 +01:00
|
|
|
postInstall = ''
|
|
|
|
sed -e 's:--max-worker-restart=5::g' -i setup.cfg
|
|
|
|
'';
|
|
|
|
|
2019-10-22 13:38:03 +01:00
|
|
|
dontUseSetuptoolsCheck = true;
|
|
|
|
|
2019-11-11 21:08:58 +00:00
|
|
|
# disable mem-usage tests on mac, has trouble serializing pickle files
|
|
|
|
disabledTests = lib.optionals isPy35 [ "exception_persistent_flush_py3k "]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ "MemUsageWBackendTest" "MemUsageTest" ];
|
2019-10-22 13:38:03 +01:00
|
|
|
|
2017-05-27 13:05:39 +01:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://www.sqlalchemy.org/";
|
2017-05-27 13:05:39 +01:00
|
|
|
description = "A Python SQL toolkit and Object Relational Mapper";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
2018-11-06 05:19:19 +00:00
|
|
|
}
|