diff options
author | Changqing Li <changqing.li@windriver.com> | 2020-04-24 09:09:39 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-04-26 14:00:51 +0100 |
commit | e5e0b30035ac4f8cc62a4c532a2ff46245ab84d0 (patch) | |
tree | 83aa145f8c79cf21c6d15a67a5e51a610e794d55 | |
parent | 9f7bd77be708955a7df3916c45f5c93f2c8b2318 (diff) | |
download | poky-e5e0b30035ac4f8cc62a4c532a2ff46245ab84d0.tar.gz |
python3-pbr: change shebang to python3
we have offcially dropped python2, so it is possible
that our code run on python3 only host, so change
shebang to python3 to avoid error like:
python: command not found
(From OE-Core rev: a0b6ae56970aa53f65ed10bebd90fefa410a7099)
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-devtools/python/python-pbr.inc | 2 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python3-pbr/0001-change-shebang-to-python3.patch | 42 |
2 files changed, 44 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python-pbr.inc b/meta/recipes-devtools/python/python-pbr.inc index 0e64501c32..ce3c224d51 100644 --- a/meta/recipes-devtools/python/python-pbr.inc +++ b/meta/recipes-devtools/python/python-pbr.inc | |||
@@ -5,6 +5,8 @@ SECTION = "devel/python" | |||
5 | LICENSE = "Apache-2.0" | 5 | LICENSE = "Apache-2.0" |
6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2" | 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2" |
7 | 7 | ||
8 | SRC_URI += "file://0001-change-shebang-to-python3.patch" | ||
9 | |||
8 | inherit pypi | 10 | inherit pypi |
9 | 11 | ||
10 | RDEPENDS_${PN} += "${PYTHON_PN}-pip" | 12 | RDEPENDS_${PN} += "${PYTHON_PN}-pip" |
diff --git a/meta/recipes-devtools/python/python3-pbr/0001-change-shebang-to-python3.patch b/meta/recipes-devtools/python/python3-pbr/0001-change-shebang-to-python3.patch new file mode 100644 index 0000000000..688da6b204 --- /dev/null +++ b/meta/recipes-devtools/python/python3-pbr/0001-change-shebang-to-python3.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From 09bd8368bf0d5385663a10eeb890131481681bdd Mon Sep 17 00:00:00 2001 | ||
2 | From: Changqing Li <changqing.li@windriver.com> | ||
3 | Date: Thu, 23 Apr 2020 09:28:58 +0000 | ||
4 | Subject: [PATCH] change shebang to python3 | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
9 | --- | ||
10 | pbr/tests/test_integration.py | 2 +- | ||
11 | pbr/tests/test_packaging.py | 2 +- | ||
12 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
13 | |||
14 | diff --git a/pbr/tests/test_integration.py b/pbr/tests/test_integration.py | ||
15 | index 8e96f21..b07cbe3 100644 | ||
16 | --- a/pbr/tests/test_integration.py | ||
17 | +++ b/pbr/tests/test_integration.py | ||
18 | @@ -150,7 +150,7 @@ class TestInstallWithoutPbr(base.BaseTestCase): | ||
19 | pkgs = { | ||
20 | 'pkgTest': { | ||
21 | 'setup.py': textwrap.dedent("""\ | ||
22 | - #!/usr/bin/env python | ||
23 | + #!/usr/bin/env python3 | ||
24 | import setuptools | ||
25 | setuptools.setup( | ||
26 | name = 'pkgTest', | ||
27 | diff --git a/pbr/tests/test_packaging.py b/pbr/tests/test_packaging.py | ||
28 | index 07be547..f6a9412 100644 | ||
29 | --- a/pbr/tests/test_packaging.py | ||
30 | +++ b/pbr/tests/test_packaging.py | ||
31 | @@ -206,7 +206,7 @@ class CreatePackages(fixtures.Fixture): | ||
32 | |||
33 | defaults = { | ||
34 | 'setup.py': textwrap.dedent(six.u("""\ | ||
35 | - #!/usr/bin/env python | ||
36 | + #!/usr/bin/env python3 | ||
37 | import setuptools | ||
38 | setuptools.setup( | ||
39 | setup_requires=['pbr'], | ||
40 | -- | ||
41 | 2.24.1 | ||
42 | |||