[Buildroot] [RFC PATCH 1/1] support: utils: Use python3

Petr Vorel petr.vorel at gmail.com
Wed Sep 15 19:10:52 UTC 2021


> From: Petr Vorel
> > Sent: 14 September 2021 18:43

> > Python 2 is EOL sice 2020 [1], it's still available on distros, but may not
> > be installed by default (as being replaced by python3).

> ...
> > -#!/usr/bin/env python
> > +#!/usr/bin/env python3

> Doesn't python3 just get installed as python?
No, that's for python2. At least on Debian and openSUSE. On current Debian
testing it's only python3. Sure, I can install python2 package now, but sooner
or later python2 will be removed. And I'm not sure if all distros just change
python symlink to python3 binary, when they remove python2 package.

> So you don't need to change these lines.

> ...
> > diff --git a/utils/check-package b/utils/check-package
> > index dd18d19c25..6540af6b2d 100755
> > --- a/utils/check-package
> > +++ b/utils/check-package
> > @@ -1,4 +1,4 @@
> > -#!/usr/bin/env python
> > +#!/usr/bin/env python3
> >  # See utils/checkpackagelib/readme.txt before editing this file.

> >  from __future__ import print_function

> For p3 you can also remove that import.
Ah, correct, thanks! I'll add it in v2:

Kind regards,
Petr

> FWIW that didn't help me get some python scripts to run under
> p2 and p3 because one of the p2 installations was too old to
> support it.

> 	David


More information about the buildroot mailing list