Skip to content

Commit

Permalink
scripts: Explicitly call out python2
Browse files Browse the repository at this point in the history
At least one Linux distribution (Arch) has made python 3 the default
interpreter, and Debian and Ubuntu have expressed a desire to eventually
make this the case.  As such, invoking 'python' or '/usr/bin/python'
will possibly run python 3 instead of version 2.

Distributions have included a 'python2' link for quite some time now,
and given that we have some scripts that require python 3, we should be
explicit about those that require python 2.

In addition, be more consistent about how python is invoked, preferring
the:

  #!/usr/bin/env python2

construct rather than a hardcoded path to python.  This allows the user
to have an alternative python in their path that will be used in
preference to the system provided version.

Jira: ZEP-1548
Change-Id: I125c2af808dc268f74277bc97a092df3acad23c0
Signed-off-by: David Brown <[email protected]>
  • Loading branch information
d3zd3z committed Jan 12, 2017
1 parent ae2cf51 commit 8405ce1
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion scripts/check_link_map.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2
import fileinput
import re
import sys
Expand Down
2 changes: 1 addition & 1 deletion scripts/checkconfig.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2

"""Zephyr Check kconfigs Definitions
Expand Down
2 changes: 1 addition & 1 deletion scripts/compare_footprint
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2

"""
This script help you to compare footprint results with previous commits in git.
Expand Down
2 changes: 1 addition & 1 deletion scripts/diffconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python2
#
# diffconfig - a tool to compare .config files.
#
Expand Down
2 changes: 1 addition & 1 deletion scripts/filter-known-issues.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/python
#! /usr/bin/env python2
import argparse
import logging
import mmap
Expand Down
2 changes: 1 addition & 1 deletion scripts/size_report
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python2
#
# Copyright (c) 2016, Intel Corporation
#
Expand Down
2 changes: 1 addition & 1 deletion scripts/sysgen
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/env python2
#
# sysgen - System Generator
#
Expand Down

0 comments on commit 8405ce1

Please sign in to comment.