depot/third_party/nixpkgs/pkgs/development/python-modules/sqlalchemy/default.nix
Default email a3bb8d7922 Project import generated by Copybara.
GitOrigin-RevId: 439b1605227b8adb1357b55ce8529d541abbe9eb
2021-08-06 00:33:18 +03:00

49 lines
971 B
Nix

{ stdenv
, lib
, fetchPypi
, buildPythonPackage
, isPy3k
, pythonOlder
, greenlet
, importlib-metadata
, mock
, pysqlite ? null
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "SQLAlchemy";
version = "1.4.22";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-7BvibNzNYNGANZpSfVmA2VmiYmmix7GzJ6HuoMqzftg=";
};
propagatedBuildInputs = [
greenlet
] ++ lib.optionals (pythonOlder "3.8") [
importlib-metadata
];
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
disabledTests = lib.optionals stdenv.isDarwin [
"MemUsageWBackendTest"
"MemUsageTest"
];
meta = with lib; {
homepage = "http://www.sqlalchemy.org/";
description = "A Python SQL toolkit and Object Relational Mapper";
license = licenses.mit;
};
}