summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python
diff options
context:
space:
mode:
authorMing Liu <peter.x.liu@external.atlascopco.com>2016-08-09 10:01:41 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-17 10:35:42 +0100
commitbba1b911c86557db66af4baf7f15813f43c1ae70 (patch)
tree5e5ce8c78ccb5fbc6ca1aea4f08127ca14e2de3e /meta/recipes-devtools/python
parent92f505b0162f666b14208e2835c7def9f2cd4f2c (diff)
downloadpoky-bba1b911c86557db66af4baf7f15813f43c1ae70.tar.gz
Use PYTHON_SITEPACKAGES_DIR insted of hard-coded *site-packages*
For thoese recipes that are inheriting python*-dir.bbclass, there is already a PYTHON_SITEPACKAGES_DIR present, use that definition replacing redundant "${libdir}/python*/site-packages". (From OE-Core rev: e7d842673952aa4aaa141f64958bc1344dbe8210) Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.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/python-setuptools.inc2
-rw-r--r--meta/recipes-devtools/python/python-setuptools_22.0.5.bb2
-rw-r--r--meta/recipes-devtools/python/python-smartpm_git.bb36
-rw-r--r--meta/recipes-devtools/python/python3-pip_8.1.2.bb8
-rw-r--r--meta/recipes-devtools/python/python3-setuptools_22.0.5.bb2
5 files changed, 25 insertions, 25 deletions
diff --git a/meta/recipes-devtools/python/python-setuptools.inc b/meta/recipes-devtools/python/python-setuptools.inc
index 53a514b14d..92ca9a0028 100644
--- a/meta/recipes-devtools/python/python-setuptools.inc
+++ b/meta/recipes-devtools/python/python-setuptools.inc
@@ -17,5 +17,5 @@ UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/setuptools"
17S = "${WORKDIR}/${SRCNAME}-${PV}" 17S = "${WORKDIR}/${SRCNAME}-${PV}"
18 18
19do_install_prepend() { 19do_install_prepend() {
20 install -d ${D}/${libdir}/${PYTHON_DIR}/site-packages 20 install -d ${D}${PYTHON_SITEPACKAGES_DIR}
21} 21}
diff --git a/meta/recipes-devtools/python/python-setuptools_22.0.5.bb b/meta/recipes-devtools/python/python-setuptools_22.0.5.bb
index c172039231..526474c7ea 100644
--- a/meta/recipes-devtools/python/python-setuptools_22.0.5.bb
+++ b/meta/recipes-devtools/python/python-setuptools_22.0.5.bb
@@ -7,7 +7,7 @@ DEPENDS_class-native += "python-native"
7 7
8inherit distutils 8inherit distutils
9 9
10DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${libdir}/${PYTHON_DIR}/site-packages" 10DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${PYTHON_SITEPACKAGES_DIR}"
11 11
12RDEPENDS_${PN} = "\ 12RDEPENDS_${PN} = "\
13 python-stringold \ 13 python-stringold \
diff --git a/meta/recipes-devtools/python/python-smartpm_git.bb b/meta/recipes-devtools/python/python-smartpm_git.bb
index 668d171a58..0c260482df 100644
--- a/meta/recipes-devtools/python/python-smartpm_git.bb
+++ b/meta/recipes-devtools/python/python-smartpm_git.bb
@@ -56,41 +56,41 @@ inherit distutils
56 56
57do_install_append() { 57do_install_append() {
58 # We don't support the following items 58 # We don't support the following items
59 rm -rf ${D}${libdir}/python*/site-packages/smart/backends/slack 59 rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/smart/backends/slack
60 rm -rf ${D}${libdir}/python*/site-packages/smart/backends/arch 60 rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/smart/backends/arch
61 rm -rf ${D}${libdir}/python*/site-packages/smart/interfaces/qt 61 rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/smart/interfaces/qt
62 62
63 # Temporary, debian support in OE is missing the python module 63 # Temporary, debian support in OE is missing the python module
64 rm -f ${D}${libdir}/python*/site-packages/smart/plugins/aptchannelsync.py* 64 rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/aptchannelsync.py*
65 rm -f ${D}${libdir}/python*/site-packages/smart/plugins/debdir.py* 65 rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/debdir.py*
66 rm -rf ${D}${libdir}/python*/site-packages/smart/backends/deb 66 rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/smart/backends/deb
67 67
68 # Disable automatic channel detection 68 # Disable automatic channel detection
69 rm -f ${D}${libdir}/python*/site-packages/smart/plugins/detectsys.py* 69 rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/detectsys.py*
70 70
71 # Disable landscape support 71 # Disable landscape support
72 rm -f ${D}${libdir}/python*/site-packages/smart/plugins/landscape.py* 72 rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/landscape.py*
73 73
74 # Disable urpmi channel support 74 # Disable urpmi channel support
75 rm -f ${D}${libdir}/python*/site-packages/smart/plugins/urpmichannelsync.py* 75 rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/urpmichannelsync.py*
76 76
77 # Disable yum channel support 77 # Disable yum channel support
78 rm -f ${D}${libdir}/python*/site-packages/smart/plugins/yumchannelsync.py* 78 rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/yumchannelsync.py*
79 79
80 # Disable zypper channel support 80 # Disable zypper channel support
81 rm -f ${D}${libdir}/python*/site-packages/smart/plugins/zyppchannelsync.py* 81 rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/zyppchannelsync.py*
82 82
83 if [ -z "${@bb.utils.contains('PACKAGECONFIG', 'rpm', 'rpm', '', d)}" ]; then 83 if [ -z "${@bb.utils.contains('PACKAGECONFIG', 'rpm', 'rpm', '', d)}" ]; then
84 rm -f ${D}${libdir}/python*/site-packages/smart/plugins/rpmdir.py* 84 rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/rpmdir.py*
85 rm -rf ${D}${libdir}/python*/site-packages/smart/backends/rpm 85 rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/smart/backends/rpm
86 fi 86 fi
87 87
88 if [ -z "${@bb.utils.contains('PACKAGECONFIG', 'qt4', 'qt4', '', d)}" ]; then 88 if [ -z "${@bb.utils.contains('PACKAGECONFIG', 'qt4', 'qt4', '', d)}" ]; then
89 rm -rf ${D}${libdir}/python*/site-packages/smart/interfaces/qt4 89 rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/smart/interfaces/qt4
90 fi 90 fi
91 91
92 if [ -z "${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'gtk', '', d)}" ]; then 92 if [ -z "${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'gtk', '', d)}" ]; then
93 rm -rf ${D}${libdir}/python*/site-packages/smart/interfaces/gtk 93 rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/smart/interfaces/gtk
94 fi 94 fi
95} 95}
96 96
@@ -130,10 +130,10 @@ RDEPENDS_${PN}-interface-gtk = "gtk+ ${PN}-interface-images"
130 130
131FILES_smartpm = "${bindir}/smart" 131FILES_smartpm = "${bindir}/smart"
132 132
133FILES_${PN}-backend-rpm = "${libdir}/python*/site-packages/smart/backends/rpm" 133FILES_${PN}-backend-rpm = "${PYTHON_SITEPACKAGES_DIR}/smart/backends/rpm"
134 134
135FILES_${PN}-interface-qt4 = "${libdir}/python*/site-packages/smart/interfaces/qt4" 135FILES_${PN}-interface-qt4 = "${PYTHON_SITEPACKAGES_DIR}/smart/interfaces/qt4"
136FILES_${PN}-interface-gtk = "${libdir}/python*/site-packages/smart/interfaces/gtk" 136FILES_${PN}-interface-gtk = "${PYTHON_SITEPACKAGES_DIR}/smart/interfaces/gtk"
137FILES_${PN}-interface-images = "${datadir}/${baselib}/python*/site-packages/smart/interfaces/images" 137FILES_${PN}-interface-images = "${datadir}/${baselib}/python*/site-packages/smart/interfaces/images"
138 138
139BBCLASSEXTEND = "native nativesdk" 139BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/python/python3-pip_8.1.2.bb b/meta/recipes-devtools/python/python3-pip_8.1.2.bb
index e319dff675..eefb4cb796 100644
--- a/meta/recipes-devtools/python/python3-pip_8.1.2.bb
+++ b/meta/recipes-devtools/python/python3-pip_8.1.2.bb
@@ -18,16 +18,16 @@ S = "${WORKDIR}/${SRCNAME}-${PV}"
18 18
19inherit distutils3 19inherit distutils3
20 20
21DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${libdir}/${PYTHON_DIR}/site-packages" 21DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${PYTHON_SITEPACKAGES_DIR}"
22 22
23do_install_prepend() { 23do_install_prepend() {
24 install -d ${D}/${libdir}/${PYTHON_DIR}/site-packages 24 install -d ${D}${PYTHON_SITEPACKAGES_DIR}
25} 25}
26 26
27# Use setuptools site.py instead, avoid shared state issue 27# Use setuptools site.py instead, avoid shared state issue
28do_install_append() { 28do_install_append() {
29 rm ${D}/${libdir}/${PYTHON_DIR}/site-packages/site.py 29 rm ${D}${PYTHON_SITEPACKAGES_DIR}/site.py
30 rm ${D}/${libdir}/${PYTHON_DIR}/site-packages/__pycache__/site.cpython-*.pyc 30 rm ${D}${PYTHON_SITEPACKAGES_DIR}/__pycache__/site.cpython-*.pyc
31 31
32 # Install as pip3 and leave pip2 as default 32 # Install as pip3 and leave pip2 as default
33 rm ${D}/${bindir}/pip 33 rm ${D}/${bindir}/pip
diff --git a/meta/recipes-devtools/python/python3-setuptools_22.0.5.bb b/meta/recipes-devtools/python/python3-setuptools_22.0.5.bb
index fb2931c3f2..65af6f0dad 100644
--- a/meta/recipes-devtools/python/python3-setuptools_22.0.5.bb
+++ b/meta/recipes-devtools/python/python3-setuptools_22.0.5.bb
@@ -5,7 +5,7 @@ DEPENDS_class-native += "python3-native"
5 5
6inherit distutils3 6inherit distutils3
7 7
8DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${libdir}/${PYTHON_DIR}/site-packages" 8DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${PYTHON_SITEPACKAGES_DIR}"
9 9
10# The installer puts the wrong path in the setuptools.pth file. Correct it. 10# The installer puts the wrong path in the setuptools.pth file. Correct it.
11do_install_append() { 11do_install_append() {