# Mender client python example on yocto build

**URL:** <https://hub.mender.io/t/mender-client-python-example-on-yocto-build/5931>\
**Category:** Yocto Project\
**Tags:** yocto\
**Created:** [June 22, 2023, 10:55am UTC](https://hub.mender.io/t/mender-client-python-example-on-yocto-build/5931 "2023-06-22T10:55:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saurabh](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@Saurabh](https://hub.mender.io/u/Saurabh)\
**Post date:** [June 22, 2023, 10:55am UTC](https://hub.mender.io/t/mender-client-python-example-on-yocto-build/5931/1 "2023-06-22T10:55:43Z")

</div>

I would like to run the client python example ([GitHub - mendersoftware/mender-client-python-example](https://github.com/mendersoftware/mender-client-python-example)) on a device with rootfs built using yocto. I would like to adapt this script to control the upgrade process. There are several problems:

a. This requires me to install pip3, git, git-perltools, pkconf on the image. These are developer tools which I can’t afford to run on my production which is something I absolutely don’t want. pip3 is the biggest problem because it opens the door for unwanted software updates.

b. Some of the installations done to install the example would be on the rootfs so would go away when the image is upgraded.

The question is has anyone already ever done it.

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [June 22, 2023, 7:20pm UTC](https://hub.mender.io/t/mender-client-python-example-on-yocto-build/5931/2 "2023-06-22T19:20:50Z")

</div>

Hi @Saurabh,

thanks for getting in touch. The Readme in the linked repository is quite Debian-focused, I agree. In a Yocto-based setup, you would write a recipe for it including a `inherit setuptools` as far as I can tell reight away, and add the noted dependencies in the recipe as well.

The approach is certainly different, but once packaged as a recipe it can be easily incorporated into any build and as such is persistent across updates.

Greetz,  
Josef

---

<div class="post-metadata">

**Author:** ![Everett](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/everett/32/2213_2.png) [@Everett](https://hub.mender.io/u/Everett)\
**Post date:** [June 9, 2024, 11:43am UTC](https://hub.mender.io/t/mender-client-python-example-on-yocto-build/5931/3 "2024-06-09T11:43:27Z")

</div>

Hi @TheYoctoJester,

I agree with your viewpoint. Here I am sharing the link of another approach which can prove to be a short cut for this. Find the link below 👇

> **[Integrating Mender State Scripts in Yocto - A Step by Step Guide | Mender](https://mender.io/blog/integrating-mender-state-scripts-in-yocto)**
>
> This tutorial will explain specifically the concept of state scripts in the OTA solution Mender.io and give an example of how to integrate them into Yocto
