Skip to content

Commit 5c2b8a2

Browse files
committed
Use meson.build in subdir
1 parent b72d76b commit 5c2b8a2

File tree

3 files changed

+61
-67
lines changed

3 files changed

+61
-67
lines changed

meson.build

Lines changed: 1 addition & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -32,72 +32,7 @@ common_c_args = [
3232
'-DLIBSYSTEMD_VERSION=' + libsystemd_dep.version(),
3333
]
3434

35-
# Build _journal extension module
36-
python.extension_module(
37-
'_journal',
38-
['systemd/_journal.c', 'systemd/pyutil.c'],
39-
dependencies: [libsystemd_dep],
40-
c_args: common_c_args,
41-
install: true,
42-
subdir: 'systemd',
43-
)
44-
45-
# Build _reader extension module
46-
python.extension_module(
47-
'_reader',
48-
['systemd/_reader.c', 'systemd/pyutil.c', 'systemd/strv.c'],
49-
dependencies: [libsystemd_dep],
50-
c_args: common_c_args,
51-
install: true,
52-
subdir: 'systemd',
53-
)
54-
55-
# Build _daemon extension module
56-
python.extension_module(
57-
'_daemon',
58-
['systemd/_daemon.c', 'systemd/pyutil.c', 'systemd/util.c'],
59-
dependencies: [libsystemd_dep],
60-
c_args: common_c_args,
61-
install: true,
62-
subdir: 'systemd',
63-
)
64-
65-
# Build id128 extension module
66-
python.extension_module(
67-
'id128',
68-
['systemd/id128.c', 'systemd/pyutil.c'],
69-
dependencies: [libsystemd_dep],
70-
c_args: common_c_args,
71-
install: true,
72-
subdir: 'systemd',
73-
)
74-
75-
# Build login extension module
76-
python.extension_module(
77-
'login',
78-
['systemd/login.c', 'systemd/pyutil.c', 'systemd/strv.c'],
79-
dependencies: [libsystemd_dep],
80-
c_args: common_c_args,
81-
install: true,
82-
subdir: 'systemd',
83-
)
84-
85-
# Install Python modules (matching py_modules in setup.py)
86-
python.install_sources(
87-
'systemd/__init__.py',
88-
'systemd/journal.py',
89-
'systemd/daemon.py',
90-
subdir: 'systemd',
91-
)
92-
93-
# Install test modules
94-
python.install_sources(
95-
'systemd/test/test_daemon.py',
96-
'systemd/test/test_journal.py',
97-
'systemd/test/test_login.py',
98-
'systemd/test/test_id128.py',
99-
subdir: 'systemd/test',
100-
)
35+
subdir('systemd')
10136

10237
run_target(
10338
'update-constants',

systemd/meson.build

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Build _journal extension module
2+
python.extension_module(
3+
'_journal',
4+
['_journal.c', 'pyutil.c'],
5+
dependencies: [libsystemd_dep],
6+
c_args: common_c_args,
7+
install: true,
8+
)
9+
10+
# Build _reader extension module
11+
python.extension_module(
12+
'_reader',
13+
['_reader.c', 'pyutil.c', 'strv.c'],
14+
dependencies: [libsystemd_dep],
15+
c_args: common_c_args,
16+
install: true,
17+
)
18+
19+
# Build _daemon extension module
20+
python.extension_module(
21+
'_daemon',
22+
['_daemon.c', 'pyutil.c', 'util.c'],
23+
dependencies: [libsystemd_dep],
24+
c_args: common_c_args,
25+
install: true,
26+
)
27+
28+
# Build id128 extension module
29+
python.extension_module(
30+
'id128',
31+
['id128.c', 'pyutil.c'],
32+
dependencies: [libsystemd_dep],
33+
c_args: common_c_args,
34+
install: true,
35+
)
36+
37+
# Build login extension module
38+
python.extension_module(
39+
'login',
40+
['login.c', 'pyutil.c', 'strv.c'],
41+
dependencies: [libsystemd_dep],
42+
c_args: common_c_args,
43+
install: true,
44+
)
45+
46+
# Install Python modules (matching py_modules in setup.py)
47+
python.install_sources(
48+
'__init__.py',
49+
'journal.py',
50+
'daemon.py',
51+
)
52+
53+
# Install test modules
54+
python.install_sources(
55+
'test/test_daemon.py',
56+
'test/test_journal.py',
57+
'test/test_login.py',
58+
'test/test_id128.py',
59+
subdir: 'test',
60+
)

update-constants.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Read definitions from /usr/include/systemd/sd-messages.h and systemd/id128-defines.h files, convert to ones in systemd/id128-constants.h
33
"""
44

5-
import os
65
import re
76
import sys
87
import itertools

0 commit comments

Comments
 (0)