2021-02-23 20:00:45 +01:00
|
|
|
{ stdenv, lib, fetchPypi, buildPythonPackage, isPy3k, isPy35, fetchpatch
|
2017-05-27 14:05:39 +02:00
|
|
|
, mock
|
2021-03-24 17:45:56 +01:00
|
|
|
, pysqlite ? null
|
2019-10-22 14:38:03 +02:00
|
|
|
, pytestCheckHook
|
2021-02-02 15:41:16 +01:00
|
|
|
, pytest_xdist
|
2017-05-27 14:05:39 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "SQLAlchemy";
|
2021-02-20 10:09:17 +01:00
|
|
|
version = "1.3.23";
|
2017-05-27 14:05:39 +02:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-02-20 10:09:17 +01:00
|
|
|
sha256 = "6fca33672578666f657c131552c4ef8979c1606e494f78cd5199742dfb26918b";
|
2017-05-27 14:05:39 +02:00
|
|
|
};
|
|
|
|
|
2021-02-23 20:00:45 +01:00
|
|
|
patches = [
|
|
|
|
# fix test_pyodbc_extra_connect_azure test failure
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/sqlalchemy/sqlalchemy/commit/7293b3dc0e9eb3dae84ffd831494b85355df8e73.patch";
|
|
|
|
sha256 = "1z61lzxamz74771ddlqmbxba1dcr77f016vqfcmb44dxb228w2db";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2017-08-25 19:03:41 +02:00
|
|
|
checkInputs = [
|
2019-10-22 14:38:03 +02:00
|
|
|
pytestCheckHook
|
2021-02-02 15:41:16 +01:00
|
|
|
pytest_xdist
|
2017-08-25 19:03:41 +02:00
|
|
|
mock
|
|
|
|
] ++ lib.optional (!isPy3k) pysqlite;
|
2017-05-27 14:05:39 +02:00
|
|
|
|
2021-02-02 15:41:16 +01:00
|
|
|
pytestFlagsArray = [ "-n auto" ];
|
|
|
|
|
2019-07-16 16:24:12 -07: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 13:08:58 -08: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
|
|
|
|
2017-05-27 14:05:39 +02:00
|
|
|
meta = with lib; {
|
2020-03-31 21:11:51 -04:00
|
|
|
homepage = "http://www.sqlalchemy.org/";
|
2017-05-27 14:05:39 +02:00
|
|
|
description = "A Python SQL toolkit and Object Relational Mapper";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
2018-11-05 23:19:19 -06:00
|
|
|
}
|