@@ -34,20 +34,14 @@ common_c_args = [
3434
3535subdir (' src' )
3636
37- run_target (
38- ' update-constants' ,
39- command : [
40- python,
41- files (' update-constants.py' ),
42- ' -i' , libsystemd_dep.get_variable (' includedir' ),
43- ' -s' , meson .project_source_root() / ' systemd' ,
37+ test (
38+ ' pytest' ,
39+ python,
40+ args : [
41+ ' -m' , ' pytest' ,
42+ meson .project_source_root() / ' src/systemd/test' ,
4443 ],
45- )
46-
47- # Run target to generate TAGS file for Emacs
48- run_target (
49- ' ctags' ,
50- command : [' ctags' , ' -R' , ' @SOURCE_ROOT@/systemd' ],
44+ workdir : meson .project_build_root(),
5145)
5246
5347run_target (
@@ -63,20 +57,31 @@ run_target(
6357 ],
6458)
6559
66- test (
67- ' pytest' ,
68- python,
69- args : [
70- ' -m' , ' pytest' ,
71- ' ../systemd/test' ,
60+ run_target (
61+ ' update-constants' ,
62+ command : [
63+ python,
64+ files (' update-constants.py' ),
65+ ' -i' , libsystemd_dep.get_variable (' includedir' ),
66+ ' -s' , meson .project_source_root() / ' systemd' ,
7267 ],
73- workdir : meson .project_build_root(),
7468)
7569
70+ # Trick to keep Meson from demanding other tools to be available at building Python extention time.
71+ env_bin = find_program (' env' , required : false )
72+
73+ # Run target to generate TAGS file for Emacs
74+ run_target (
75+ ' ctags' ,
76+ command : [env_bin, ' ctags' , ' -R' , ' @SOURCE_ROOT@/src/systemd' ],
77+ )
78+
79+
7680# Sync built HTML docs to the remote server using rsync.
7781run_target (
7882 ' doc-sync' ,
7983 command : [
84+ env_bin,
8085 ' rsync' ,
8186 ' -rlv' ,
8287 ' --delete' ,
@@ -93,7 +98,7 @@ signature_filename = 'systemd-python-' + version + '.tar.gz.asc'
9398# Run target to sign the distribution tarball using GPG.
9499run_target (
95100 ' sign' ,
96- command : [' gpg' , ' --detach-sign' , ' -a' , archive],
101+ command : [env_bin, ' gpg' , ' --detach-sign' , ' -a' , archive],
97102)
98103
99104# NOTE: Run 'sign' target before 'upload' to ensure the signature file exists.
0 commit comments