mirror of
https://gitlab.freedesktop.org/upower/power-profiles-daemon.git
synced 2025-12-20 04:30:09 +01:00
Convert pylint to a meson feature
Enable by default if it's found.
This commit is contained in:
parent
3d509fa6d2
commit
e9f26f965f
5 changed files with 7 additions and 7 deletions
|
|
@ -60,7 +60,7 @@ build_stable:
|
|||
--fatal-meson-warnings
|
||||
--warnlevel 2
|
||||
-Dgtk_doc=true
|
||||
-Dpylint=true
|
||||
-Dpylint=enabled
|
||||
-Dmanpage=enabled
|
||||
-Db_coverage=true
|
||||
_build
|
||||
|
|
|
|||
|
|
@ -49,8 +49,8 @@ gnome = import('gnome')
|
|||
add_global_arguments('-D_GNU_SOURCE=1', language: 'c')
|
||||
add_global_arguments(common_cflags, language: 'c')
|
||||
|
||||
if get_option('pylint')
|
||||
pylint = find_program('pylint-3', 'pylint3', 'pylint', required: true)
|
||||
pylint = find_program('pylint-3', 'pylint3', 'pylint', required: get_option('pylint'))
|
||||
if pylint.found()
|
||||
nomalloc = environment({'MALLOC_PERTURB_': '0'})
|
||||
pylint_flags = ['-d', 'C0116', '-d', 'C0114', '-d', 'W0707', '-d', 'W0706' ]
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ option('gtk_doc',
|
|||
value: false,
|
||||
description: 'Build docs')
|
||||
option('pylint',
|
||||
type: 'boolean',
|
||||
value: false,
|
||||
type: 'feature',
|
||||
value: 'auto',
|
||||
description: 'Run pylint checks, for developers only')
|
||||
option('tests',
|
||||
description: 'Whether to run tests',
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ powerprofilesctl = files('powerprofilesctl')
|
|||
install_data(powerprofilesctl,
|
||||
install_dir: get_option('bindir')
|
||||
)
|
||||
if get_option('pylint')
|
||||
if pylint.found()
|
||||
test('pylint-powerprofilesctl',
|
||||
pylint,
|
||||
args: pylint_flags + [ powerprofilesctl ],
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ foreach ut: unit_tests
|
|||
)
|
||||
endforeach
|
||||
|
||||
if get_option('pylint')
|
||||
if pylint.found()
|
||||
integration_pylint_flags = ['-d', 'W0511', '-d', 'C0302'] + pylint_flags
|
||||
test('pylint-integration-tests',
|
||||
pylint,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue