mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 01:19:52 +00:00
bootchart2: move to Python 3
(From OE-Core rev: c4829e96272376c61d8645df75c4b946f37b461c) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
4672ffabc6
commit
ada03c326b
@@ -99,7 +99,7 @@ SRCREV = "48e0071048564c6af75ab969e842d6dec808da09"
|
|||||||
|
|
||||||
inherit systemd
|
inherit systemd
|
||||||
inherit update-rc.d
|
inherit update-rc.d
|
||||||
inherit pythonnative
|
inherit python3native
|
||||||
|
|
||||||
# The only reason to build bootchart2-native is for a native pybootchartgui.
|
# The only reason to build bootchart2-native is for a native pybootchartgui.
|
||||||
BBCLASSEXTEND = "native"
|
BBCLASSEXTEND = "native"
|
||||||
@@ -110,13 +110,6 @@ UPDATERCPN = "bootchartd-stop-initscript"
|
|||||||
INITSCRIPT_NAME = "bootchartd_stop.sh"
|
INITSCRIPT_NAME = "bootchartd_stop.sh"
|
||||||
INITSCRIPT_PARAMS = "start 99 2 3 4 5 ."
|
INITSCRIPT_PARAMS = "start 99 2 3 4 5 ."
|
||||||
|
|
||||||
# We want native pybootchartgui to execute with the correct Python interpeter.
|
|
||||||
do_compile_append_class-native () {
|
|
||||||
echo "#! ${PYTHON}" | cat - ${S}/pybootchartgui.py > ${WORKDIR}/temp_pybootchartgui
|
|
||||||
mv ${WORKDIR}/temp_pybootchartgui ${S}/pybootchartgui.py
|
|
||||||
chmod +x ${S}/pybootchartgui
|
|
||||||
}
|
|
||||||
|
|
||||||
do_compile_prepend () {
|
do_compile_prepend () {
|
||||||
export PY_LIBDIR="${libdir}/${PYTHON_DIR}"
|
export PY_LIBDIR="${libdir}/${PYTHON_DIR}"
|
||||||
export BINDIR="${bindir}"
|
export BINDIR="${bindir}"
|
||||||
@@ -135,14 +128,17 @@ do_install () {
|
|||||||
install -m 0755 ${WORKDIR}/bootchartd_stop.sh ${D}${sysconfdir}/init.d
|
install -m 0755 ${WORKDIR}/bootchartd_stop.sh ${D}${sysconfdir}/init.d
|
||||||
|
|
||||||
echo 'EXIT_PROC="$EXIT_PROC matchbox-window-manager"' >> ${D}${sysconfdir}/bootchartd.conf
|
echo 'EXIT_PROC="$EXIT_PROC matchbox-window-manager"' >> ${D}${sysconfdir}/bootchartd.conf
|
||||||
|
|
||||||
|
# Use python 3 instead of python 2
|
||||||
|
sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${bindir}/pybootchartgui
|
||||||
}
|
}
|
||||||
|
|
||||||
PACKAGES =+ "pybootchartgui"
|
PACKAGES =+ "pybootchartgui"
|
||||||
FILES_pybootchartgui += "${libdir}/python*/site-packages/pybootchartgui ${bindir}/pybootchartgui"
|
FILES_pybootchartgui += "${libdir}/python*/site-packages/pybootchartgui ${bindir}/pybootchartgui"
|
||||||
RDEPENDS_pybootchartgui = "python-pycairo python-compression python-image python-textutils python-shell python-compression python-codecs"
|
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 += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'sysvinit-pidof', 'procps', d)}"
|
||||||
RDEPENDS_${PN}_class-target += "lsb"
|
RDEPENDS_${PN}_class-target += "lsb"
|
||||||
DEPENDS_append_class-native = " python-pycairo-native"
|
DEPENDS_append_class-native = " python3-pycairo-native"
|
||||||
|
|
||||||
PACKAGES =+ "bootchartd-stop-initscript"
|
PACKAGES =+ "bootchartd-stop-initscript"
|
||||||
FILES_bootchartd-stop-initscript += "${sysconfdir}/init.d ${sysconfdir}/rc*.d"
|
FILES_bootchartd-stop-initscript += "${sysconfdir}/init.d ${sysconfdir}/rc*.d"
|
||||||
|
|||||||
Reference in New Issue
Block a user