depot/third_party/nixpkgs/pkgs/development/python-modules/logbook/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

87 lines
1.5 KiB
Nix

{ lib
, brotli
, buildPythonPackage
, cython
, execnet
, fetchFromGitHub
, jinja2
, pytestCheckHook
, pythonOlder
, pyzmq
, redis
, setuptools
, sqlalchemy
}:
buildPythonPackage rec {
pname = "logbook";
version = "1.7.0.post0";
format = "setuptools";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "getlogbook";
repo = "logbook";
rev = "refs/tags/${version}";
hash = "sha256-bqfFSd7CPYII/3AJCMApqmAYrAWjecOb3JA17FPFMIc=";
};
nativeBuildInputs = [
cython
setuptools
];
passthru.optional-dependencies = {
execnet = [
execnet
];
sqlalchemy = [
sqlalchemy
];
redis = [
redis
];
zmq = [
pyzmq
];
compression = [
brotli
];
jinja = [
jinja2
];
all = [
brotli
execnet
jinja2
pyzmq
redis
sqlalchemy
];
};
nativeCheckInputs = [
pytestCheckHook
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
# Some of the tests use localhost networking.
__darwinAllowLocalNetworking = true;
pythonImportsCheck = [
"logbook"
];
disabledTests = [
# Test require Redis instance
"test_redis_handler"
];
meta = with lib; {
description = "A logging replacement for Python";
homepage = "https://logbook.readthedocs.io/";
changelog = "https://github.com/getlogbook/logbook/blob/${version}/CHANGES";
license = licenses.bsd3;
maintainers = with maintainers; [ ];
};
}