[CRIU] [PATCH 5/6] test: make crit-recode.py python2/python3 compatible
Adrian Reber
adrian at lisas.de
Wed May 30 22:09:42 MSK 2018
On Wed, May 30, 2018 at 09:39:38PM +0300, Andrei Vagin wrote:
> Signed-off-by: Andrei Vagin <avagin at virtuozzo.com>
> ---
> test/crit-recode.py | 43 +++++++++++++++++++++++--------------------
> 1 file changed, 23 insertions(+), 20 deletions(-)
>
> diff --git a/test/crit-recode.py b/test/crit-recode.py
> index 0d4b31777..0cb3341d3 100755
> --- a/test/crit-recode.py
> +++ b/test/crit-recode.py
> @@ -1,9 +1,11 @@
> -#!/bin/env python2
> +#!/usr/bin/env python
I understand what and why you are doing this but I just wanted to
mention that this is rather the opposite from what I heard should be
done. I am not a python expert so I am just repeating what I heard
elsewhere and I think the Fedora packaging guidelines are also
mentioning it.
It is better to explicitly use python2 or python3, especially as I
understand it, the python binary should never be python3 and one should
avoid the use of an unversioned python binary.
I understand that it makes it easier to run it in travis either with
python2 or python3 by changing the link like you did in the other
commit. Maybe our scripts should not include a shebang at all and always
be called with the corresponding interpreter. So either 'python2
test/crit-recode.py' or 'python3 test/crit-recode.py'.
This is in no way important to me, I just wanted to mention it as I had
the same problem with crit.
Adrian
More information about the CRIU
mailing list