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