From 4a4fabaa8f6915513a3b1ef2268c402e96eca888 Mon Sep 17 00:00:00 2001 From: Changqing Li Date: Fri, 24 Apr 2020 09:09:40 +0800 Subject: python3-pip: 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 Signed-off-by: Changqing Li Signed-off-by: Richard Purdie --- .../0001-change-shebang-to-python3.patch | 60 ++++++++++++++++++++++ meta/recipes-devtools/python/python3-pip_20.0.2.bb | 2 + 2 files changed, 62 insertions(+) create mode 100644 meta/recipes-devtools/python/python3-pip/0001-change-shebang-to-python3.patch diff --git a/meta/recipes-devtools/python/python3-pip/0001-change-shebang-to-python3.patch b/meta/recipes-devtools/python/python3-pip/0001-change-shebang-to-python3.patch new file mode 100644 index 0000000000..00cffe169b --- /dev/null +++ b/meta/recipes-devtools/python/python3-pip/0001-change-shebang-to-python3.patch @@ -0,0 +1,60 @@ +From e7a00e9b5104ae2fbcea32a35c85760b77fae7e5 Mon Sep 17 00:00:00 2001 +From: Changqing Li +Date: Thu, 23 Apr 2020 09:42:10 +0000 +Subject: [PATCH] change shebang to python3 + +Upstream-Status: Pending + +pip will drop support of python2 from 21.0 + +Signed-off-by: Changqing Li +--- + src/pip/_internal/__init__.py | 2 +- + src/pip/_vendor/appdirs.py | 2 +- + src/pip/_vendor/chardet/cli/chardetect.py | 2 +- + src/pip/_vendor/requests/certs.py | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/pip/_internal/__init__.py b/src/pip/_internal/__init__.py +index 3aa8a46..e1ad179 100755 +--- a/src/pip/_internal/__init__.py ++++ b/src/pip/_internal/__init__.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + import pip._internal.utils.inject_securetransport # noqa + from pip._internal.utils.typing import MYPY_CHECK_RUNNING + +diff --git a/src/pip/_vendor/appdirs.py b/src/pip/_vendor/appdirs.py +index 3a52b75..ad3f81d 100644 +--- a/src/pip/_vendor/appdirs.py ++++ b/src/pip/_vendor/appdirs.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # -*- coding: utf-8 -*- + # Copyright (c) 2005-2010 ActiveState Software Inc. + # Copyright (c) 2013 Eddy Petrișor +diff --git a/src/pip/_vendor/chardet/cli/chardetect.py b/src/pip/_vendor/chardet/cli/chardetect.py +index c61136b..a497e98 100644 +--- a/src/pip/_vendor/chardet/cli/chardetect.py ++++ b/src/pip/_vendor/chardet/cli/chardetect.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + """ + Script which takes one or more file paths and reports on their detected + encodings +diff --git a/src/pip/_vendor/requests/certs.py b/src/pip/_vendor/requests/certs.py +index 06a594e..bfa7839 100644 +--- a/src/pip/_vendor/requests/certs.py ++++ b/src/pip/_vendor/requests/certs.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # -*- coding: utf-8 -*- + + """ +-- +2.24.1 + diff --git a/meta/recipes-devtools/python/python3-pip_20.0.2.bb b/meta/recipes-devtools/python/python3-pip_20.0.2.bb index 08738fb2f9..96973db774 100644 --- a/meta/recipes-devtools/python/python3-pip_20.0.2.bb +++ b/meta/recipes-devtools/python/python3-pip_20.0.2.bb @@ -6,6 +6,8 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=8ba06d529c955048e5ddd7c45459eb2e" DEPENDS += "python3 python3-setuptools-native" +SRC_URI += "file://0001-change-shebang-to-python3.patch" + SRC_URI[md5sum] = "7d42ba49b809604f0df3d55df1c3fd86" SRC_URI[sha256sum] = "7db0c8ea4c7ea51c8049640e8e6e7fde949de672bfa4949920675563a5a6967f" -- cgit 1.2.3-korg