forked from python-sdbus/python-sdbus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
46 lines (38 loc) · 877 Bytes
/
meson.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
project('python-sdbus', 'c')
python_module = import('python')
python = python_module.find_installation('python3')
mypy = find_program(
'mypy',
required : false,
)
flake8 = find_program(
'flake8',
required : false,
)
linter_script = files('./tools/run_py_linters.py')
if mypy.found() and flake8.found()
run_target(
'lint-python',
command : [python, linter_script, 'lint'],
)
else
warning('Mypy or Flake8 not found. Python linting disabled')
endif
autopep8 = find_program(
'autopep8',
required : false,
)
isort = find_program(
'isort',
required : false,
)
if autopep8.found() and isort.found()
run_target(
'format-python',
command : [python, linter_script, 'format'],
)
else
warning('autopep8 or isort not found. Python formating disabled')
endif
subdir('src')
subdir('wheel-build')