[ovirt-devel] [VDSM] Handling of scripts without a .py suffix

Yaniv Bronheim ybronhei at redhat.com
Sun May 29 10:02:26 UTC 2016


On Sun, May 29, 2016 at 12:36 PM, Dan Kenigsberg <danken at redhat.com> wrote:

> On Sat, May 28, 2016 at 03:16:10PM +0300, Nir Soffer wrote:
> > Hi all,
> >
> > We have several scripts spread in the source, typically installed in
> > /usr/libexec/vdsm.
> > We had a useless WHITELIST[1], trying to compile these scripts with
> python3, and
> > we have similar (but working) whitelist for pyflakes and pep8.
> >
> > To simplify the various checks, I think we need to to do this:
> > 1. Keep .py suffix for all python files
> > 2. Move all scripts to helpers/ ([2] handles storage scripts)
> > 3. During installation, strip the .py suffix.


we can leave the py suffix. it doesn't really matter

>

>
> > With these changes, we can use the various checking commands on the
> entire
> > source tree.
> >
> > For example, these commands check the entire tree:
> >
> >     PYTHONDONTWRITEBYTECODE=1 python3 -m compileall -f -x
> '(\.tox/|\.git/)' .
> >     pep8 .
> >     pyflakes .
> >
> > Thoughts?
> >
> > [1] https://gerrit.ovirt.org/58204
> > [2] https://gerrit.ovirt.org/57363
>
> Sounds good, though I'd love to keep the separation of scripts into
> their natuaral vertical. Keep storage understand storage, etc. Why are
> you piling them into one source directory?
>

I didn't comment yet because I don't like the idea behind "helpers" folder
in vdsm tree, and I don't have any better offers except "scripts". we can
also migrate those scripts to python.. not so sure how much value we can
get from it if any


_______________________________________________
> Devel mailing list
> Devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/devel
>



-- 
*Yaniv Bronhaim.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/devel/attachments/20160529/81abdb8f/attachment-0001.html>


More information about the Devel mailing list