How to remove the python3 from Yocto SDK
Vinothkumar Eswaran
Hello, May I know how to remove python3 from the host and target sdk package ? TOOLCHAIN_HOST_TASK_remove = " nativesdk-python3-core", seems not to work. The image is built on top of core-image. Python3 is not installed to image. We deliver SDK to other teams and they are complaining that python3 in sdk is causing problems after sourcing the sdk. They want to use host python3 instead of the one delivered from Yocto SDK. Could you help ? Thanks & regards, Vinothkumar
|
|
Alexander Kanavin
It would help if you explain what the problems are. Generally things
toggle quoted messageShow quoted text
are tested together with the python provided from yocto, so if you use tooling from the host, you might run into other problems. Alex
On Tue, 7 Jun 2022 at 11:47, Vinothkumar Eswaran <evinoth1206@...> wrote:
|
|
Vinothkumar Eswaran
Thanks Alex for your reply. What kind of testing you mean ? The problem is when other teams use Yocto sdk after sourcing it, python3 is pointing to the one from SDK and not from the host. During the build for some analysis, the team require python modules which is not part of the standard yocto sdk. These python modules are already installed to the host. Because of the PATH change, the build fails with no python modules found. The python modules the team use is customized ones and adding it to image is not an option here.
|
|
Alexander Kanavin
I need to do additional investigation to give a better answer, but is
toggle quoted messageShow quoted text
it possible for the team to start the host python with a full path, e.g. /usr/bin/python3, so that PATH doesn't get in the way? Alex
On Tue, 7 Jun 2022 at 12:36, Vinothkumar Eswaran <evinoth1206@...> wrote:
|
|
Vinothkumar Eswaran
Hi Alex, yes the absolute path works. May I ask why python3 is part of the SDK and is it possible to remove it from the SDK ? regards, Vinothkumar
|
|
Alexander Kanavin
Python3 isn't directly pulled into the SDK, but is a runtime
toggle quoted messageShow quoted text
dependency of other items, such as meson. You can check that by $ bitbake core-image-minimal -g -c populate_sdk and reading/grepping the .dot file for nativesdk-python3. Meson in turn is pulled in by the sdk packagegroup: $ grep nativesdk-meson task-depends.dot |grep packagegroup "nativesdk-packagegroup-sdk-host.do_package_write_rpm" -> "nativesdk-meson.do_packagedata" I guess if you drop all python consumers from packagegroups, then python won't get pulled in either, but that is swimming in uncharted waters, and you'll need to ensure replacements from the host are available. Alex
On Tue, 7 Jun 2022 at 14:21, Vinothkumar Eswaran <evinoth1206@...> wrote:
|
|
It would be fairly simple to make a ‘dummy’ python3 recipe, like there already is for perl, which you can explicitly add to the SDK to use the host python. This would break anything inside the SDK which is a Python module with a C extension, as those need to be build against the right python.
Ross
From:
yocto@... <yocto@...> on behalf of Alexander Kanavin via lists.yoctoproject.org <alex.kanavin=gmail.com@...> Python3 isn't directly pulled into the SDK, but is a runtime
On Tue, 7 Jun 2022 at 14:21, Vinothkumar Eswaran <evinoth1206@...> wrote:
> > Hi Alex, > > yes the absolute path works. May I ask why python3 is part of the SDK and is it possible to remove it from the SDK ? > > regards, > > Vinothkumar > > > > IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
|
|