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