1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 7 # build-system 8 setuptools, 9 10 # dependencies 11 debtcollector, 12 oslo-config, 13 oslo-context, 14 oslo-serialization, 15 oslo-utils, 16 pbr, 17 python-dateutil, 18 pyinotify, 19 20 # tests 21 eventlet, 22 oslotest, 23 pytestCheckHook, 24}: 25 26buildPythonPackage rec { 27 pname = "oslo-log"; 28 version = "7.1.0"; 29 pyproject = true; 30 31 src = fetchFromGitHub { 32 owner = "openstack"; 33 repo = "oslo.log"; 34 tag = version; 35 hash = "sha256-ybWrNwP9L7iOzft10TgRFxA4mCRDVozVC2ZAopgITqo="; 36 }; 37 38 # Manually set version because prb wants to get it from the git upstream repository (and we are 39 # installing from tarball instead) 40 PBR_VERSION = version; 41 42 build-system = [ setuptools ]; 43 44 dependencies = [ 45 debtcollector 46 oslo-config 47 oslo-context 48 oslo-serialization 49 oslo-utils 50 pbr 51 python-dateutil 52 ] ++ lib.optionals stdenv.hostPlatform.isLinux [ pyinotify ]; 53 54 nativeCheckInputs = [ 55 eventlet 56 oslotest 57 pytestCheckHook 58 ]; 59 60 disabledTests = [ 61 # not compatible with sandbox 62 "test_logging_handle_error" 63 # File which is used doesn't seem not to be present 64 "test_log_config_append_invalid" 65 ]; 66 67 pythonImportsCheck = [ "oslo_log" ]; 68 69 __darwinAllowLocalNetworking = true; 70 71 meta = { 72 description = "oslo.log library"; 73 mainProgram = "convert-json"; 74 homepage = "https://github.com/openstack/oslo.log"; 75 license = lib.licenses.asl20; 76 teams = [ lib.teams.openstack ]; 77 }; 78}