summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2018-07-19 22:59:06 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-26 13:16:40 +0100
commitf931b6fbcb0d564eeda05ea0857f2e3f27b65077 (patch)
treefe6f1f8e195c175c9a5184e6f6811841ba719971 /meta/recipes-devtools/python
parent892d38c5de36c6f491dcb1c12d5aee3d23ed3d9b (diff)
downloadpoky-f931b6fbcb0d564eeda05ea0857f2e3f27b65077.tar.gz
python3-pip: clean up obsolete
Since unify var-DISTUTILS_INSTALL_ARGS in distutils and setuptools, - The local DISTUTILS_INSTALL_ARGS assignment is obsolete; - The site.py is not be generated any more; - The layout is in a standard pip dir (such as /usr/lib/python3.5/site- packages/pip rather than /lib/python3.5/site-packages/pip-10.0.1- py3.5.egg/pip), the pth file is not required; `#!/usr/bin/env python3' is already used, do not manually sed. [YOCTO #8446] (From OE-Core rev: 5797631dc7a68e10c848ef06dd9eed011bc06e34) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python')
-rw-r--r--meta/recipes-devtools/python/python3-pip_10.0.1.bb18
1 files changed, 0 insertions, 18 deletions
diff --git a/meta/recipes-devtools/python/python3-pip_10.0.1.bb b/meta/recipes-devtools/python/python3-pip_10.0.1.bb
index 100d4d0743..8deec2bdf1 100644
--- a/meta/recipes-devtools/python/python3-pip_10.0.1.bb
+++ b/meta/recipes-devtools/python/python3-pip_10.0.1.bb
@@ -11,27 +11,9 @@ SRC_URI[sha256sum] = "f2bd08e0cd1b06e10218feaf6fef299f473ba706582eb3bd9d52203fdb
11 11
12inherit pypi distutils3 12inherit pypi distutils3
13 13
14DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${PYTHON_SITEPACKAGES_DIR}"
15
16do_install_prepend() {
17 install -d ${D}${PYTHON_SITEPACKAGES_DIR}
18}
19
20# Use setuptools site.py instead, avoid shared state issue
21do_install_append() { 14do_install_append() {
22 rm ${D}${PYTHON_SITEPACKAGES_DIR}/site.py
23 rm ${D}${PYTHON_SITEPACKAGES_DIR}/__pycache__/site.cpython-*.pyc
24
25 # Install as pip3 and leave pip2 as default 15 # Install as pip3 and leave pip2 as default
26 rm ${D}/${bindir}/pip 16 rm ${D}/${bindir}/pip
27
28 # Installed eggs need to be passed directly to the interpreter via a pth file
29 echo "./${PYPI_PACKAGE}-${PV}-py${PYTHON_BASEVERSION}.egg" > ${D}${PYTHON_SITEPACKAGES_DIR}/${PYPI_PACKAGE}-${PV}.pth
30
31 # Make sure we use /usr/bin/env python3
32 for PYTHSCRIPT in `grep -rIl ${bindir} ${D}${bindir}/pip3*`; do
33 sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT
34 done
35} 17}
36 18
37RDEPENDS_${PN} = "\ 19RDEPENDS_${PN} = "\