]> code.ossystems Code Review - openembedded-core.git/commitdiff
python3-pbr: change shebang to python3
authorChangqing Li <changqing.li@windriver.com>
Fri, 24 Apr 2020 01:09:39 +0000 (09:09 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 26 Apr 2020 12:58:59 +0000 (13:58 +0100)
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

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/python/python-pbr.inc
meta/recipes-devtools/python/python3-pbr/0001-change-shebang-to-python3.patch [new file with mode: 0644]

index 0e64501c32b238a4ab6a74d36a3a2c71e528f3ef..ce3c224d51ae77f0021493a8d5bfb27c4442596a 100644 (file)
@@ -5,6 +5,8 @@ SECTION = "devel/python"
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2"
 
+SRC_URI += "file://0001-change-shebang-to-python3.patch"
+
 inherit pypi
 
 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 (file)
index 0000000..688da6b
--- /dev/null
@@ -0,0 +1,42 @@
+From 09bd8368bf0d5385663a10eeb890131481681bdd Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Thu, 23 Apr 2020 09:28:58 +0000
+Subject: [PATCH] change shebang to python3
+
+Upstream-Status: Pending
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ pbr/tests/test_integration.py | 2 +-
+ pbr/tests/test_packaging.py   | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/pbr/tests/test_integration.py b/pbr/tests/test_integration.py
+index 8e96f21..b07cbe3 100644
+--- a/pbr/tests/test_integration.py
++++ b/pbr/tests/test_integration.py
+@@ -150,7 +150,7 @@ class TestInstallWithoutPbr(base.BaseTestCase):
+         pkgs = {
+             'pkgTest': {
+                 'setup.py': textwrap.dedent("""\
+-                    #!/usr/bin/env python
++                    #!/usr/bin/env python3
+                     import setuptools
+                     setuptools.setup(
+                         name = 'pkgTest',
+diff --git a/pbr/tests/test_packaging.py b/pbr/tests/test_packaging.py
+index 07be547..f6a9412 100644
+--- a/pbr/tests/test_packaging.py
++++ b/pbr/tests/test_packaging.py
+@@ -206,7 +206,7 @@ class CreatePackages(fixtures.Fixture):
+     defaults = {
+         'setup.py': textwrap.dedent(six.u("""\
+-            #!/usr/bin/env python
++            #!/usr/bin/env python3
+             import setuptools
+             setuptools.setup(
+                 setup_requires=['pbr'],
+-- 
+2.24.1
+