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>
This commit is contained in:
parent
92f505b016
commit
bba1b911c8
|
@ -134,7 +134,7 @@ do_install () {
|
|||
}
|
||||
|
||||
PACKAGES =+ "pybootchartgui"
|
||||
FILES_pybootchartgui += "${libdir}/python*/site-packages/pybootchartgui ${bindir}/pybootchartgui"
|
||||
FILES_pybootchartgui += "${PYTHON_SITEPACKAGES_DIR}/pybootchartgui ${bindir}/pybootchartgui"
|
||||
RDEPENDS_pybootchartgui = "python3-pycairo python3-compression python3-image python3-textutils python3-shell python3-compression python3-codecs"
|
||||
RDEPENDS_${PN}_class-target += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'sysvinit-pidof', 'procps', d)}"
|
||||
RDEPENDS_${PN}_class-target += "lsb"
|
||||
|
|
|
@ -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}
|
||||
}
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -259,7 +259,7 @@ PACKAGECONFIG[xar] = "--with-xar,--without-xar,xar,"
|
|||
|
||||
WITH_PYTHON = " --with-python=${PYTHON_BASEVERSION} \
|
||||
--with-python-inc-dir=${STAGING_INCDIR}/python${PYTHON_BASEVERSION} \
|
||||
--with-python-lib-dir=${libdir}/python${PYTHON_BASEVERSION}/site-packages \
|
||||
--with-python-lib-dir=${PYTHON_SITEPACKAGES_DIR} \
|
||||
--without-pythonembed"
|
||||
PACKAGECONFIG[python] = "${WITH_PYTHON},--without-python,python,"
|
||||
|
||||
|
@ -477,7 +477,7 @@ RDEPENDS_${PN}-build = "file bash perl"
|
|||
|
||||
RDEPENDS_python-rpm = "${PN} python"
|
||||
|
||||
FILES_python-rpm = "${libdir}/python*/site-packages/rpm"
|
||||
FILES_python-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm"
|
||||
PROVIDES += "python-rpm"
|
||||
|
||||
FILES_perl-module-rpm = "${libdir}/perl/*/* \
|
||||
|
@ -512,7 +512,7 @@ FILES_${PN}-staticdev = " \
|
|||
${libdir}/librpmmisc.a \
|
||||
${libdir}/librpmbuild.a \
|
||||
${libdir}/rpm/lib/liblua.a \
|
||||
${libdir}/python*/site-packages/rpm/*.a \
|
||||
${PYTHON_SITEPACKAGES_DIR}/rpm/*.a \
|
||||
"
|
||||
|
||||
do_configure() {
|
||||
|
@ -581,10 +581,10 @@ do_install_append() {
|
|||
rm -f ${D}/${mandir}/man1/lz*.1
|
||||
rm -f ${D}/${libdir}/pkgconfig/liblzma*
|
||||
|
||||
rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/*.a
|
||||
rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/*.la
|
||||
rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/rpm/*.a
|
||||
rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/rpm/*.la
|
||||
rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/*.a
|
||||
rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/*.la
|
||||
rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/rpm/*.a
|
||||
rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/rpm/*.la
|
||||
|
||||
#find ${D}/${libdir}/perl5 -type f -a \( -name perllocal.pod -o -name .packlist \
|
||||
# -o \( -name '*.bs' -a -empty \) \) -exec rm -f {} ';'
|
||||
|
@ -647,11 +647,11 @@ EOF
|
|||
}
|
||||
|
||||
do_install_append_class-native () {
|
||||
sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env nativepython|' ${D}/${libdir}/python2.7/site-packages/rpm/transaction.py
|
||||
sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env nativepython|' ${D}${PYTHON_SITEPACKAGES_DIR}/rpm/transaction.py
|
||||
}
|
||||
|
||||
do_install_append_class-nativesdk () {
|
||||
sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env python|' ${D}/${libdir}/python2.7/site-packages/rpm/transaction.py
|
||||
sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env python|' ${D}${PYTHON_SITEPACKAGES_DIR}/rpm/transaction.py
|
||||
}
|
||||
|
||||
def multilib_rpmmacros(d):
|
||||
|
|
|
@ -16,8 +16,8 @@ RDEPENDS_${PN}-ptest += "make perl bash"
|
|||
SRCREV = "a90f2c1e10b759782653a81815625e9d1bbb75ca"
|
||||
PV = "2.7.1+git${SRCPV}"
|
||||
|
||||
PYTHON_OPTION = "am_cv_python_pyexecdir='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \
|
||||
am_cv_python_pythondir='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \
|
||||
PYTHON_OPTION = "am_cv_python_pyexecdir='${PYTHON_SITEPACKAGES_DIR}' \
|
||||
am_cv_python_pythondir='${PYTHON_SITEPACKAGES_DIR}' \
|
||||
PYTHON_INCLUDE='-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}${PYTHON_ABI}' \
|
||||
"
|
||||
PACKAGECONFIG ??= "lttng-ust"
|
||||
|
@ -39,9 +39,9 @@ USERADD_PACKAGES = "${PN}"
|
|||
GROUPADD_PARAM_${PN} = "tracing"
|
||||
|
||||
FILES_${PN} += "${libdir}/lttng/libexec/* ${datadir}/xml/lttng \
|
||||
${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
|
||||
FILES_${PN}-staticdev += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.a"
|
||||
FILES_${PN}-dev += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.la"
|
||||
${PYTHON_SITEPACKAGES_DIR}/*"
|
||||
FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
|
||||
FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la"
|
||||
|
||||
# Since files are installed into ${libdir}/lttng/libexec we match
|
||||
# the libexec insane test so skip it.
|
||||
|
|
|
@ -217,7 +217,7 @@ RSUGGESTS_${PN} += "${PN}-archive ${PN}-tests ${RSUGGESTS_SCRIPTING}"
|
|||
FILES_${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core ${libdir}/traceevent"
|
||||
FILES_${PN}-archive = "${libdir}/perf/perf-core/perf-archive"
|
||||
FILES_${PN}-tests = "${libdir}/perf/perf-core/tests ${libexecdir}/perf-core/tests"
|
||||
FILES_${PN}-python = "${libdir}/python*/site-packages ${libdir}/perf/perf-core/scripts/python"
|
||||
FILES_${PN}-python = "${libdir}/perf/perf-core/scripts/python ${PYTHON_SITEPACKAGES_DIR}"
|
||||
FILES_${PN}-python += "${libexecdir}/perf-core/scripts/python/*"
|
||||
FILES_${PN}-perl = "${libdir}/perf/perf-core/scripts/perl"
|
||||
|
||||
|
|
Loading…
Reference in New Issue