summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
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
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')
-rw-r--r--meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb2
-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
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.4.16.bb18
7 files changed, 35 insertions, 35 deletions
diff --git a/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb b/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb
index d0555c3edb..d039b1b947 100644
--- a/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb
+++ b/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb
@@ -134,7 +134,7 @@ do_install () {
134} 134}
135 135
136PACKAGES =+ "pybootchartgui" 136PACKAGES =+ "pybootchartgui"
137FILES_pybootchartgui += "${libdir}/python*/site-packages/pybootchartgui ${bindir}/pybootchartgui" 137FILES_pybootchartgui += "${PYTHON_SITEPACKAGES_DIR}/pybootchartgui ${bindir}/pybootchartgui"
138RDEPENDS_pybootchartgui = "python3-pycairo python3-compression python3-image python3-textutils python3-shell python3-compression python3-codecs" 138RDEPENDS_pybootchartgui = "python3-pycairo python3-compression python3-image python3-textutils python3-shell python3-compression python3-codecs"
139RDEPENDS_${PN}_class-target += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'sysvinit-pidof', 'procps', d)}" 139RDEPENDS_${PN}_class-target += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'sysvinit-pidof', 'procps', d)}"
140RDEPENDS_${PN}_class-target += "lsb" 140RDEPENDS_${PN}_class-target += "lsb"
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() {
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.16.bb b/meta/recipes-devtools/rpm/rpm_5.4.16.bb
index d264d5011a..84adef661a 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.16.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.16.bb
@@ -259,7 +259,7 @@ PACKAGECONFIG[xar] = "--with-xar,--without-xar,xar,"
259 259
260WITH_PYTHON = " --with-python=${PYTHON_BASEVERSION} \ 260WITH_PYTHON = " --with-python=${PYTHON_BASEVERSION} \
261 --with-python-inc-dir=${STAGING_INCDIR}/python${PYTHON_BASEVERSION} \ 261 --with-python-inc-dir=${STAGING_INCDIR}/python${PYTHON_BASEVERSION} \
262 --with-python-lib-dir=${libdir}/python${PYTHON_BASEVERSION}/site-packages \ 262 --with-python-lib-dir=${PYTHON_SITEPACKAGES_DIR} \
263 --without-pythonembed" 263 --without-pythonembed"
264PACKAGECONFIG[python] = "${WITH_PYTHON},--without-python,python," 264PACKAGECONFIG[python] = "${WITH_PYTHON},--without-python,python,"
265 265
@@ -477,7 +477,7 @@ RDEPENDS_${PN}-build = "file bash perl"
477 477
478RDEPENDS_python-rpm = "${PN} python" 478RDEPENDS_python-rpm = "${PN} python"
479 479
480FILES_python-rpm = "${libdir}/python*/site-packages/rpm" 480FILES_python-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm"
481PROVIDES += "python-rpm" 481PROVIDES += "python-rpm"
482 482
483FILES_perl-module-rpm = "${libdir}/perl/*/* \ 483FILES_perl-module-rpm = "${libdir}/perl/*/* \
@@ -512,7 +512,7 @@ FILES_${PN}-staticdev = " \
512 ${libdir}/librpmmisc.a \ 512 ${libdir}/librpmmisc.a \
513 ${libdir}/librpmbuild.a \ 513 ${libdir}/librpmbuild.a \
514 ${libdir}/rpm/lib/liblua.a \ 514 ${libdir}/rpm/lib/liblua.a \
515 ${libdir}/python*/site-packages/rpm/*.a \ 515 ${PYTHON_SITEPACKAGES_DIR}/rpm/*.a \
516 " 516 "
517 517
518do_configure() { 518do_configure() {
@@ -581,10 +581,10 @@ do_install_append() {
581 rm -f ${D}/${mandir}/man1/lz*.1 581 rm -f ${D}/${mandir}/man1/lz*.1
582 rm -f ${D}/${libdir}/pkgconfig/liblzma* 582 rm -f ${D}/${libdir}/pkgconfig/liblzma*
583 583
584 rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/*.a 584 rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/*.a
585 rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/*.la 585 rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/*.la
586 rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/rpm/*.a 586 rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/rpm/*.a
587 rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/rpm/*.la 587 rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/rpm/*.la
588 588
589 #find ${D}/${libdir}/perl5 -type f -a \( -name perllocal.pod -o -name .packlist \ 589 #find ${D}/${libdir}/perl5 -type f -a \( -name perllocal.pod -o -name .packlist \
590 # -o \( -name '*.bs' -a -empty \) \) -exec rm -f {} ';' 590 # -o \( -name '*.bs' -a -empty \) \) -exec rm -f {} ';'
@@ -647,11 +647,11 @@ EOF
647} 647}
648 648
649do_install_append_class-native () { 649do_install_append_class-native () {
650 sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env nativepython|' ${D}/${libdir}/python2.7/site-packages/rpm/transaction.py 650 sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env nativepython|' ${D}${PYTHON_SITEPACKAGES_DIR}/rpm/transaction.py
651} 651}
652 652
653do_install_append_class-nativesdk () { 653do_install_append_class-nativesdk () {
654 sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env python|' ${D}/${libdir}/python2.7/site-packages/rpm/transaction.py 654 sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env python|' ${D}${PYTHON_SITEPACKAGES_DIR}/rpm/transaction.py
655} 655}
656 656
657def multilib_rpmmacros(d): 657def multilib_rpmmacros(d):