depot/third_party/nixpkgs/pkgs/development/python-modules/sqlalchemy/default.nix
Default email 2ce5db779a Project import generated by Copybara.
GitOrigin-RevId: 48037fd90426e44e4bf03e6479e88a11453b9b66
2022-05-18 16:49:53 +02:00

49 lines
969 B
Nix

{ stdenv
, lib
, fetchPypi
, buildPythonPackage
, isPy3k
, pythonOlder
, greenlet
, importlib-metadata
, mock
, pysqlite ? null
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "SQLAlchemy";
version = "1.4.36";
src = fetchPypi {
inherit pname version;
hash = "sha256-ZGeKwyHWSkWQHvLiRyXsXng/H0pYgwXhlkMUR+es4kM=";
};
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;
};
}