blob: a2dafcf6c3d736afd1bc3f66f3ee7cf9285458d8 [file] [log] [blame]
Andrew Geissler68be0732020-04-14 11:25:29 -05001inherit update-alternatives
2
Patrick Williams12fc9392021-08-06 09:16:53 -05003ALTERNATIVE:${PN}-core += "python"
Andrew Geissler68be0732020-04-14 11:25:29 -05004ALTERNATIVE_LINK_NAME[python] = "${bindir}/python"
5ALTERNATIVE_TARGET[python] = "${bindir}/python3"
Andrew Geisslerb2808372020-04-14 11:26:24 -05006
Andrew Geisslera5f67742020-04-15 10:26:16 -05007# python3 takes up a lot of space that most embedded systems
8# do not have, so remove some un-needed files from the rootfs
Patrick Williams12fc9392021-08-06 09:16:53 -05009do_install:append:class-target() {
Andrew Geisslera5f67742020-04-15 10:26:16 -050010 # Even though python3 is built with --without-ensurepip, it still installs
11 # a large, compressed version of pip. Remove it to free up the space.
Andrew Geisslerb2808372020-04-14 11:26:24 -050012 rm -rf ${D}${libdir}/python${PYTHON_MAJMIN}/ensurepip
13}