]> code.ossystems Code Review - openembedded-core.git/commitdiff
python3-pip: change shebang to python3
authorChangqing Li <changqing.li@windriver.com>
Fri, 24 Apr 2020 01:09:40 +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/python3-pip/0001-change-shebang-to-python3.patch [new file with mode: 0644]
meta/recipes-devtools/python/python3-pip_20.0.2.bb

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 (file)
index 0000000..00cffe1
--- /dev/null
@@ -0,0 +1,60 @@
+From e7a00e9b5104ae2fbcea32a35c85760b77fae7e5 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+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 <changqing.li@windriver.com>
+---
+ 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
+
index 08738fb2f9d0e65abdf5c4dfc02bf594b75716ab..96973db774702c1cae35527865f0a89d9e433aeb 100644 (file)
@@ -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"