diff options
author | Ming Liu <peter.x.liu@external.atlascopco.com> | 2016-08-09 10:01:41 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-08-17 10:33:32 +0100 |
commit | e7d842673952aa4aaa141f64958bc1344dbe8210 (patch) | |
tree | c80d7dcd76364c1f27c3f96e4bc2a122bbea6dc1 /meta/recipes-devtools/python | |
parent | 9f9240d175acee274c04242fd5781094b3f5491b (diff) | |
download | openembedded-core-e7d842673952aa4aaa141f64958bc1344dbe8210.tar.gz openembedded-core-e7d842673952aa4aaa141f64958bc1344dbe8210.tar.bz2 openembedded-core-e7d842673952aa4aaa141f64958bc1344dbe8210.zip |
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".
Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-devtools/python')
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" S = "${WORKDIR}/${SRCNAME}-${PV}" do_install_prepend() { - install -d ${D}/${libdir}/${PYTHON_DIR}/site-packages + install -d ${D}${PYTHON_SITEPACKAGES_DIR} } 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" inherit distutils -DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${libdir}/${PYTHON_DIR}/site-packages" +DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${PYTHON_SITEPACKAGES_DIR}" RDEPENDS_${PN} = "\ 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 do_install_append() { # We don't support the following items - rm -rf ${D}${libdir}/python*/site-packages/smart/backends/slack - rm -rf ${D}${libdir}/python*/site-packages/smart/backends/arch - rm -rf ${D}${libdir}/python*/site-packages/smart/interfaces/qt + rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/smart/backends/slack + rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/smart/backends/arch + rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/smart/interfaces/qt # Temporary, debian support in OE is missing the python module - rm -f ${D}${libdir}/python*/site-packages/smart/plugins/aptchannelsync.py* - rm -f ${D}${libdir}/python*/site-packages/smart/plugins/debdir.py* - rm -rf ${D}${libdir}/python*/site-packages/smart/backends/deb + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/aptchannelsync.py* + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/debdir.py* + rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/smart/backends/deb # Disable automatic channel detection - rm -f ${D}${libdir}/python*/site-packages/smart/plugins/detectsys.py* + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/detectsys.py* # Disable landscape support - rm -f ${D}${libdir}/python*/site-packages/smart/plugins/landscape.py* + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/landscape.py* # Disable urpmi channel support - rm -f ${D}${libdir}/python*/site-packages/smart/plugins/urpmichannelsync.py* + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/urpmichannelsync.py* # Disable yum channel support - rm -f ${D}${libdir}/python*/site-packages/smart/plugins/yumchannelsync.py* + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/yumchannelsync.py* # Disable zypper channel support - rm -f ${D}${libdir}/python*/site-packages/smart/plugins/zyppchannelsync.py* + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/zyppchannelsync.py* if [ -z "${@bb.utils.contains('PACKAGECONFIG', 'rpm', 'rpm', '', d)}" ]; then - rm -f ${D}${libdir}/python*/site-packages/smart/plugins/rpmdir.py* - rm -rf ${D}${libdir}/python*/site-packages/smart/backends/rpm + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/rpmdir.py* + rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/smart/backends/rpm fi if [ -z "${@bb.utils.contains('PACKAGECONFIG', 'qt4', 'qt4', '', d)}" ]; then - rm -rf ${D}${libdir}/python*/site-packages/smart/interfaces/qt4 + rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/smart/interfaces/qt4 fi if [ -z "${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'gtk', '', d)}" ]; then - rm -rf ${D}${libdir}/python*/site-packages/smart/interfaces/gtk + rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/smart/interfaces/gtk fi } @@ -130,10 +130,10 @@ RDEPENDS_${PN}-interface-gtk = "gtk+ ${PN}-interface-images" FILES_smartpm = "${bindir}/smart" -FILES_${PN}-backend-rpm = "${libdir}/python*/site-packages/smart/backends/rpm" +FILES_${PN}-backend-rpm = "${PYTHON_SITEPACKAGES_DIR}/smart/backends/rpm" -FILES_${PN}-interface-qt4 = "${libdir}/python*/site-packages/smart/interfaces/qt4" -FILES_${PN}-interface-gtk = "${libdir}/python*/site-packages/smart/interfaces/gtk" +FILES_${PN}-interface-qt4 = "${PYTHON_SITEPACKAGES_DIR}/smart/interfaces/qt4" +FILES_${PN}-interface-gtk = "${PYTHON_SITEPACKAGES_DIR}/smart/interfaces/gtk" FILES_${PN}-interface-images = "${datadir}/${baselib}/python*/site-packages/smart/interfaces/images" BBCLASSEXTEND = "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}" inherit distutils3 -DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${libdir}/${PYTHON_DIR}/site-packages" +DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${PYTHON_SITEPACKAGES_DIR}" do_install_prepend() { - install -d ${D}/${libdir}/${PYTHON_DIR}/site-packages + install -d ${D}${PYTHON_SITEPACKAGES_DIR} } # Use setuptools site.py instead, avoid shared state issue do_install_append() { - rm ${D}/${libdir}/${PYTHON_DIR}/site-packages/site.py - rm ${D}/${libdir}/${PYTHON_DIR}/site-packages/__pycache__/site.cpython-*.pyc + rm ${D}${PYTHON_SITEPACKAGES_DIR}/site.py + rm ${D}${PYTHON_SITEPACKAGES_DIR}/__pycache__/site.cpython-*.pyc # Install as pip3 and leave pip2 as default 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" inherit distutils3 -DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${libdir}/${PYTHON_DIR}/site-packages" +DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${PYTHON_SITEPACKAGES_DIR}" # The installer puts the wrong path in the setuptools.pth file. Correct it. do_install_append() { |