at 25.11-pre 1.4 kB view raw
1{ 2 lib, 3 brotli, 4 buildPythonPackage, 5 cython, 6 execnet, 7 fetchFromGitHub, 8 jinja2, 9 pytestCheckHook, 10 pytest-rerunfailures, 11 pythonOlder, 12 pyzmq, 13 redis, 14 setuptools, 15 sqlalchemy, 16}: 17 18buildPythonPackage rec { 19 pname = "logbook"; 20 version = "1.8.1"; 21 format = "setuptools"; 22 23 disabled = pythonOlder "3.9"; 24 25 src = fetchFromGitHub { 26 owner = "getlogbook"; 27 repo = "logbook"; 28 tag = version; 29 hash = "sha256-Uq5/IdbwewfTCR+lbF8UcUhQe76EHpt4CFkbi3SLGLk="; 30 }; 31 32 nativeBuildInputs = [ 33 cython 34 setuptools 35 ]; 36 37 optional-dependencies = { 38 execnet = [ execnet ]; 39 sqlalchemy = [ sqlalchemy ]; 40 redis = [ redis ]; 41 zmq = [ pyzmq ]; 42 compression = [ brotli ]; 43 jinja = [ jinja2 ]; 44 all = [ 45 brotli 46 execnet 47 jinja2 48 pyzmq 49 redis 50 sqlalchemy 51 ]; 52 }; 53 54 nativeCheckInputs = [ 55 pytestCheckHook 56 pytest-rerunfailures 57 ] ++ lib.flatten (builtins.attrValues optional-dependencies); 58 59 # Some of the tests use localhost networking. 60 __darwinAllowLocalNetworking = true; 61 62 pythonImportsCheck = [ "logbook" ]; 63 64 disabledTests = [ 65 # Test require Redis instance 66 "test_redis_handler" 67 ]; 68 69 meta = with lib; { 70 description = "Logging replacement for Python"; 71 homepage = "https://logbook.readthedocs.io/"; 72 changelog = "https://github.com/getlogbook/logbook/blob/${src.tag}/CHANGES"; 73 license = licenses.bsd3; 74 maintainers = [ ]; 75 }; 76}