[bitbake-devel] #!/usr/bin/env python in bitbake files

richard.purdie at linuxfoundation.org richard.purdie at linuxfoundation.org
Wed Jun 26 09:03:50 UTC 2019


On Wed, 2019-06-26 at 16:35 +0800, Robert Yang wrote:
> Hi RP,
> 
> I think that bitbake supports python3 years ago, but some files still
> use "#!/usr/bin/env python" as shebang:
> 
> lib/bb/monitordisk.py:#!/usr/bin/env python
> lib/bb/runqueue.py:#!/usr/bin/env python
> lib/bb/taskdata.py:#!/usr/bin/env python
> lib/bb/main.py:#!/usr/bin/env python
> lib/bb/cookerdata.py:#!/usr/bin/env python
> lib/bb/parse/parse_py/__init__.py:#!/usr/bin/env python
> lib/bb/parse/parse_py/ConfHandler.py:#!/usr/bin/env python
> lib/bb/parse/parse_py/BBHandler.py:#!/usr/bin/env python
> lib/bb/namedtuple_with_abc.py:#!/usr/bin/env python
> lib/bb/cooker.py:#!/usr/bin/env python
> lib/pyinotify.py:#!/usr/bin/env python
> 
> And also a lot of files in lib/toaster/tests/.
> 
> Should we update them, please? Or should these files support python2?

We should fix them, or in some cases remove the shebang as the files
aren't designed/capable of being run directly.

Cheers,

Richard



More information about the bitbake-devel mailing list