build: Make pylint test optional

As power-profiles-daemon keeps getting built with slightly different
versions of pylint with newer warnings, disable pylint test by default
to avoid getting bug reports about it.

Closes: #52
This commit is contained in:
Bastien Nocera 2021-10-06 10:22:10 +02:00
parent ea3faa1eab
commit f83685732b
4 changed files with 10 additions and 4 deletions

View file

@ -22,7 +22,7 @@ build_stable:
- dnf upgrade -y --nogpgcheck fedora-release fedora-repos*
- dnf update -y && dnf install -y $DEPENDENCIES
script:
- meson -Dgtk_doc=true _build
- meson -Dgtk_doc=true -Dpylint=true _build
- ninja -v -C _build
- ninja -v -C _build install
- ninja -v -C _build uninstall

View file

@ -42,8 +42,10 @@ gnome = import('gnome')
add_global_arguments('-D_GNU_SOURCE=1', language: 'c')
add_global_arguments(common_cflags, language: 'c')
pylint = find_program('pylint-3', 'pylint3', 'pylint', required: false)
pylint_flags = ['-d', 'C0116', '-d', 'C0114', '-d', 'W0707']
if get_option('pylint')
pylint = find_program('pylint-3', 'pylint3', 'pylint', required: true)
pylint_flags = ['-d', 'C0116', '-d', 'C0114', '-d', 'W0707']
endif
xmllint = find_program('xmllint', required: false)
subdir('src')

View file

@ -6,3 +6,7 @@ option('gtk_doc',
type: 'boolean',
value: false,
description: 'Build docs')
option('pylint',
type: 'boolean',
value: false,
description: 'Run pylint checks, for developers only')

View file

@ -72,7 +72,7 @@ script = configure_file(
install_dir: get_option('bindir')
)
if pylint.found()
if get_option('pylint')
test('pylint-powerprofilesctl',
pylint,
args: pylint_flags + [ script ],