{"id":18870516,"url":"https://github.com/robseb/pip2bitbake","last_synced_at":"2025-07-24T13:42:10.943Z","repository":{"id":41950923,"uuid":"230747308","full_name":"robseb/PiP2Bitbake","owner":"robseb","description":"Script to create a Bitbake recipe for Python pip (PyPI) Packages to be embedded within the Yocto Project","archived":false,"fork":false,"pushed_at":"2022-11-05T22:17:59.000Z","size":144,"stargazers_count":49,"open_issues_count":4,"forks_count":14,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T04:13:32.981Z","etag":null,"topics":["bitbake","build-automation","embedded-linux","yocto-project","yocto-recipe"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robseb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"robseb"}},"created_at":"2019-12-29T12:29:49.000Z","updated_at":"2025-03-09T15:21:08.000Z","dependencies_parsed_at":"2022-08-12T00:22:20.899Z","dependency_job_id":null,"html_url":"https://github.com/robseb/PiP2Bitbake","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robseb%2FPiP2Bitbake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robseb%2FPiP2Bitbake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robseb%2FPiP2Bitbake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robseb%2FPiP2Bitbake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robseb","download_url":"https://codeload.github.com/robseb/PiP2Bitbake/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248904845,"owners_count":21180864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitbake","build-automation","embedded-linux","yocto-project","yocto-recipe"],"created_at":"2024-11-08T05:21:02.890Z","updated_at":"2025-04-14T15:23:31.611Z","avatar_url":"https://github.com/robseb.png","language":"Python","funding_links":["https://github.com/sponsors/robseb"],"categories":[],"sub_categories":[],"readme":"# PiP2Bitbake\n![GitHub](https://img.shields.io/static/v1?label=Ubuntu\u0026message=18.04+LTS,+20.04+LTS\u0026color=yellowgreen)\n![GitHub](https://img.shields.io/static/v1?label=CentOS\u0026message=7.0,+8.0\u0026color=blue)\n![GitHub](https://img.shields.io/static/v1?label=Python\u0026message=3.7\u0026color=green)\n![GitHub](https://img.shields.io/github/license/robseb/PiP2Bitbake)\n\n![Alt text](doc/concept.png?raw=true \"Concept\")\n___\n**This Python script allows to pre-install any Python** *pip* (*PyPI*) (*Python Package Index*)- **Packages within a final *Yocto Project* Linux Image.** \n\nIn order to make this possible a Bitbake-file with all necessary information's (Version Number, Checksums,..) will be generated\nto allow Bitbake to include the chosen pip-package to the *rootfs* of the generated Yocto-Project Linux Distribution. \n\nI developed this Python script to create [*rsYocto*](https://github.com/robseb/rsyocto) an embedded Linux for *Intel SoC-FPGAs*. \n\n## Features\n\n* **Python script to automatically create Bitbake recipe files for the Yocto Project to pre-install any Python *pip* package**\n* **Almost every Python pip package can implemented into a custom Linux Distribution**\n    * Of cause, it is only necessary that the package is as a cross Platform version available \n* **Outputs a *\".bb\"*-Bitbake recipe file that can easily included to any Yocto Project *meta-layer***\n* **Supported *Python Package Index Version***: 1-3\n* **Supported Python pip package archive file types:** \"*.tar.gz*\" and \"*.zip*\"\n* **It is enabled to use URL/Link to a specific Python package version or to a custom Server**\n\n\n# Guide to use this script\n1.  Pull this repository to your Yocto Project building machine\n2.  Be sure that **Python pip 3** is installed on your development machine \n    * To install that use on **Ubuntu**:\n         ```bash\n         sudo apt-get -y install python-pip\n        ````\n    * To install that use on **CentOS**:\n         ```bash\n         sudo yum install python-pip\n        ````\n3. Start the python script\n    ```bash\n     python3 makePipRecipes.py\n    ````\n4. **Find a Python [PyPI](https://pypi.org/)-package to include to the Yocto Project**\n5. **Follow the instruction of the Python script**\n    * The script will ask for:\n        1. The **pip-package** name (e.g. by `pip install pyserial` use \"`pyserial`\")\n            * Be sure that the uppercase/lowercase of the string is exact (**Case sensitive!**)\n            * **Alternatively here it is enabled to insert a URL/Link to the package**\n                * Use the entire Link with the \"*http*\"- or \"*https*\"- pre-fix and with the file suffix\n                * You can find the URLs to the package inside the *\"Download files\"* selection of the [PyPI](https://pypi.org/) package website\n                * For instance \"*pyserial*\" it would be: \"*https://files.pythonhosted.org/packages/1e/7d/ae3f0a63f41e4d2f6cb66a5b57197850f919f59e558159a4dd3a818f5082/pyserial-3.5.tar.gz*\"\n                * **Note:** \"*.whl*\" archive packages are not supported! \n\n        2. For the required **Python-Version**\n        3. For the **Type of Licence** (e.g. MIT) for recipe\n7. **The Python script will generate a *\".bb\"*-Bitbake-file**\n    * **Copy** this file to your recipe folder\n    * If you don't have a *meta-layer* create a new one\n        * Execute following command inside your Yocto Project build Folder (`poky/build`)\n            ```bash \n            bitbake-layers create-layer meta-example\n            ````\n        * Include the new layer to your Yocto Project by **adding following line** to the `poky/build/conf/bblayers.conf`-file:\n            ````txt \n            /home/\u003cuser name\u003e/poky/meta-example \\\n            ````\n     * **Copy** the generated recipe file to your recipes:\n       ```txt \n          meta-example\n          |- conf\n          | - README\n          |- recipes-test\n             |- test\n                |-GENERATED_BITBAKAE_FILE.bb\n       ```\n8. **Include the Python pip package to your Yocto Build by adding following line to the `poky/build/conf/local.conf`-file**\n    ```txt \n    IMAGE_INSTALL_append = \"pip-PIPNAME\"\n    ````\n9. **To execute the implementation start the building process of the Yocto Project normally**\n   * For example with (*inside `poky/build`*): \n      ```bash \n      bitbake core-image-minimal\n      ````\n      \n## Example: Embedding the Python pip-package `pyserial` to the Yocto Project\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eExample output after an execution\u003c/strong\u003e\u003c/summary\u003e\n\u003ca name=\"step5\"\u003e\u003c/a\u003e\n\n````txt  \nvm@ubuntu:$ python3 makePipRecipes.py \n#############################################################################\n#                                                                            #\n#    ########   ######     ##    ##  #######   ######  ########  #######     #\n#    ##     ## ##    ##     ##  ##  ##     ## ##    ##    ##    ##     ##    #\n#    ##     ## ##            ####   ##     ## ##          ##    ##     ##    #\n#    ########   ######        ##    ##     ## ##          ##    ##     ##    #\n#    ##   ##         ##       ##    ##     ## ##          ##    ##     ##    #\n#    ##    ##  ##    ##       ##    ##     ## ##    ##    ##    ##     ##    #\n#    ##     ##  ######        ##     #######   ######     ##     #######     #\n#                                                                            #\n#            AUTOMATIC SCRIPT FOR GENERATING RECIPES TO INCLUDE              #\n#           PYTHON PIP-PACKAGES TO YOUR YOCTO-PROJECT LINUX DISTO            #\n#                                                                            #\n#               by Robin Sebastian (https://github.com/robseb)               #\n#                        Contact: git@robseb.de                              #\n#                            Vers.: 1.2                                      #\n#                                                                            #\n##############################################################################\n\n\nType in the Name of the Python pip (PyPI) Package to include to your Yocto Project Linux Distro\nNote: Consider the exact writing! Case sensitive!\nYou can find Python pip packages here: https://pypi.org/\nPiP-Package Name: pyserial\nChoose the requiered Python Version:\nPython 1-2: 1,2 \nPython 3  : 3   \nPython Version:3\nType in the used License name for the recipe (e.g.: MIT)\nLicense name: \nChosen License name: \"MIT\"\nStarting the generation...\n\n--\u003e Download for testing the Python PiP package\nCollecting pyserial\nDownloading https://files.pythonhosted.org/packages/1e/7d/ae3f0a63f41e4d2f6cb66a5b57197850f919f59e558159a4dd3a818f5082/pyserial-3.5.tar.gz (159kB)\n    100% |████████████████████████████████| 163kB 1.1MB/s \nSaved ./makePipRec_workingFolder/pyserial-3.5.tar.gz\nSuccessfully downloaded pyserial\n\nThe Name of the downloaded file: \"pyserial-3.5.tar.gz\"\n--\u003e Calculate md5 checksum of this file\n    md5sum = 1cf25a76da59b530dbfc2cf99392dc83\n--\u003e Calculate sha256sum checksum of this file\n    sha256sum = 3c77e014170dfffbd816e6ffc205e9842efb10be9f58ec16d3e8675b4925cddb\n--\u003e Decode the current Version Code of this PiP Package\n    Version: 3.5\n--\u003e Unpackage the downloaded file to decode the included licence file\n    Unpackage the downloaded package\n[sudo] password for vm: \n    Unpackaging was successful\n    Try to find a Licence file\n    The License File was found\n--\u003e Calculate the md5-checksum for the License file\n    md5sum = 520e45e59fc2cf94aa53850f46b86436\n--\u003e Create the Bitbake .bb-File with the name\n    pip-pyserial_3.5.bb\n--\u003e Generate the content of this file\n    Bitbake file generation was successfull\n--\u003e Deleting the working Folder\n\n################################################################################\n#                                                                              #\n#                          GENERATION WAS SUCCESSFUL                           #\n#                                                                              #\n#---------------------------- Implementation Guide ----------------------------#\n# 1. Step: Copy the recipe file: \"pip-pyserial_3.5.bb\"                            \n#          to your recipe folder inside a meta layer                           \n#          For example here:                                                   \n#          meta-example                                                        \n#          |- conf                                                             \n#          |- recipes-test                                                     \n#             |- test                                                          \n#                |- pip-pyserial_3.5.bb \u003c--\n                                    \n#          (this file is located here:/home/vm/Desktop/PiP2Bitbake )          \n# 2. Step: Include the PiP-Package to your Yocto Project by                    \n#          by adding following line to the conf/local.conf file:               \n#            conf/local.conf:                                                  \n#             IMAGE_INSTALL_append = \"pip-pyserial\"\n            \n# 3. Step: Build your Yocto Project normally with bitbake\n                    \n#------------------------------------------------------------------------------#\n#                                                                              #\n#                           SUPPORT THE AUTHOR                                 #\n#                                                                              #\n#                            ROBIN SEBASTIAN                                   #\n#                     (https://github.com/robseb/)                             #\n#                             git@robseb.de                                    #\n#                                                                              #\n#    makePipRecipes and rsYocto are projects, that I have fully                #\n#        developed on my own. No companies are involved in this projects.      #\n#       I am recently graduated as Master of Since of electronic engineering   #\n#            Please support me for further development                         #\n#                                                                              #\n################################################################################\n````\n\n### Content of the generated file: `pip-pyserial_3.4.bb`\n````bitbake  \n# The is a automatic generated Code by \"makePipRecipes.py\"\n# (by Robin Sebastian (https://github.com/robseb) Vers.: 1.0) \n\nSUMMARY = \"Recipe to embedded the Python PiP Package pyserial\"\nHOMEPAGE =\"https://pypi.org/project/pyserial\"\nLICENSE = \"MIT\"\nLIC_FILES_CHKSUM = \"file://LICENSE.txt;md5=d476d94926db6e0008a5b3860d1f5c0d\"\n\ninherit pypi setuptools\nPYPI_PACKAGE = \"pyserial\"\nSRC_URI[md5sum] = \"ed6183b15519a0ae96675e9c3330c69b\"\nSRC_URI[sha256sum] = \"6e2d401fdee0eab996cf734e67773a0143b932772ca8b42451440cfed942c627\"\n````\n\u003c/details\u003e\n\n### Finally on the running Yocto-Project Linux Distribution ....\n````bash\nroot@cyclone5:~# pip list\nPackage    Version\n---------- -------\npyserial   3.4.0\n````\n### is `pyserial`pre-installed \n\u003cbr\u003e\n\n   \n* *rsyocto*; **Robin Sebastian,M.Sc. [(LinkedIn)](https://www.linkedin.com/in/robin-sebastian-a5080220a)**\n\n*Pip2BitBake* and *rsyocto* are self-developed projects in which no other companies are involved. \nIt is specifically designed to serve students and the Linux/FPGA open-source community with its publication on GitHub and its open-source MIT license. \nIn the future, *rsyocto* will retain its open-source status and it will be further developed. \n\nDue to the enthusiasm of commercial users, special features for industrial, scientific and automotive applications \nwere developed and ready for the implementation in a highly optimazed closed commercial version. \nPartnerships as an embedded SoC-FPGA design service to fulfil these specific commercial requirements are offered. \nIt should help, besides students with the *rsyocto* open-source version, commercial users, as well.   \n\n**For commercial users, please visit the *rsyocto* embedded service provider website:** \n[**rsyocto.com**](https://rsyocto.com/)\n\n[![GitHub stars](https://img.shields.io/github/stars/robseb/PiP2Bitbake?style=social)](https://GitHub.com/robseb/PiP2Bitbake/stargazers/)\n[![GitHub watchers](https://img.shields.io/github/watchers/robseb/PiP2Bitbake?style=social)](https://github.com/robseb/NIOSII_EclipseCompProject/watchers)\n[![GitHub followers](https://img.shields.io/github/followers/robseb?style=social)](https://github.com/robseb)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobseb%2Fpip2bitbake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobseb%2Fpip2bitbake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobseb%2Fpip2bitbake/lists"}