2019-11-11 22:08:58 +01:00
|
|
|
{ stdenv, lib, fetchPypi, buildPythonPackage, isPy3k, isPy35
|
2017-05-27 14:05:39 +02:00
|
|
|
, mock
|
|
|
|
, pysqlite
|
2019-10-22 14:38:03 +02:00
|
|
|
, fetchpatch
|
|
|
|
, pytestCheckHook
|
2017-05-27 14:05:39 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "SQLAlchemy";
|
2019-10-16 11:43:15 +02:00
|
|
|
version = "1.3.10";
|
2017-05-27 14:05:39 +02:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-10-16 11:43:15 +02:00
|
|
|
sha256 = "0f0768b5db594517e1f5e1572c73d14cf295140756431270d89496dc13d5e46c";
|
2017-05-27 14:05:39 +02:00
|
|
|
};
|
|
|
|
|
2017-08-25 19:03:41 +02:00
|
|
|
checkInputs = [
|
2019-10-22 14:38:03 +02:00
|
|
|
pytestCheckHook
|
2017-08-25 19:03:41 +02:00
|
|
|
mock
|
|
|
|
] ++ lib.optional (!isPy3k) pysqlite;
|
2017-05-27 14:05:39 +02:00
|
|
|
|
2019-07-17 01:24:12 +02:00
|
|
|
postInstall = ''
|
|
|
|
sed -e 's:--max-worker-restart=5::g' -i setup.cfg
|
|
|
|
'';
|
|
|
|
|
2019-10-22 14:38:03 +02:00
|
|
|
dontUseSetuptoolsCheck = true;
|
|
|
|
|
2019-11-11 22:08:58 +01: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 14:38:03 +02:00
|
|
|
|
|
|
|
patches = [
|
|
|
|
# Two patches for sqlite 3.30 compatibility.
|
|
|
|
# https://github.com/sqlalchemy/sqlalchemy/pull/4921
|
|
|
|
(fetchpatch {
|
|
|
|
url = https://github.com/sqlalchemy/sqlalchemy/commit/8b35ba54ab31aab13a34c360a31d014da1f5c809.patch;
|
|
|
|
sha256 = "065csr6pd7j1fjnv72wbz8s6xhydi5f161gj7nyqq86rxkh0nl0n";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = https://github.com/sqlalchemy/sqlalchemy/commit/e18534a9045786efdaf4963515222838c62e0300.patch;
|
|
|
|
sha256 = "0bwfwp5gmgg12qilvwdd2a5xi76bllzzapb23ybh1k34c5pla195";
|
|
|
|
})
|
|
|
|
|
|
|
|
];
|
2019-07-17 01:24:12 +02:00
|
|
|
|
2017-05-27 14:05:39 +02:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = http://www.sqlalchemy.org/;
|
|
|
|
description = "A Python SQL toolkit and Object Relational Mapper";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
2018-11-06 06:19:19 +01:00
|
|
|
}
|