[Libguestfs] [libnbd PATCH] ci: Enable python code style

Nir Soffer nsoffer at redhat.com
Tue Jun 22 19:36:54 UTC 2021


On Tue, Jun 22, 2021 at 9:20 PM Martin Kletzander <mkletzan at redhat.com> wrote:
>
> Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
> ---
>  ci/build.sh | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/ci/build.sh b/ci/build.sh
> index 7d62a84a5d4b..4ea3fec7d512 100755
> --- a/ci/build.sh
> +++ b/ci/build.sh
> @@ -8,6 +8,7 @@ main() {
>      autoreconf -if
>
>      CONFIG_ARGS="\
> +--enable-python-code-style \

I think this is intentionally optional since the version of flake8
or installed plugins can cause build failures.

See:
https://mail.google.com/mail/u/0/#inbox

Python code style should not be part of the build. This is should
be used in CI environment or by developers locally, but not when
building packages (in case this script is used for building packages).

To enable flake8 (and similar tools) the build environment must enforce
specific version of the tool. Otherwise you may get unexpected failures
when flake8 folks change the rules from version to version.

We solve this in ovirt using tox, installing a specific version of flake8:
https://github.com/oVirt/vdsm/blob/d7057084fe51dc26811c1ec0ee738ad2314e90fd/tox.ini#L147
https://github.com/oVirt/ovirt-imageio/blob/master/daemon/tox.ini#L26

>  --enable-gcc-warnings \
>  --enable-fuse \
>  --enable-ocaml \
> --
> 2.32.0
>
> _______________________________________________
> Libguestfs mailing list
> Libguestfs at redhat.com
> https://listman.redhat.com/mailman/listinfo/libguestfs
>




More information about the Libguestfs mailing list