Search code examples
pyinstalleryoctopypi

Yocto recipe pyinstaller


I'm trying to build pyinstaller recipe, I used pipoe here , but I got this error while i Told it to inherit pypi setuptools. Can anyone help please? THank you .

ERROR: ParseError at /home/yasmine/yocto/poky/meta-pyinst/recipes-pyinstaller/pyinstaller/python-altgraph_0.17.bb:16: Could not inherit file classes/setuptools.bbclass


Solution

  • First, it is good practice to use pipoe to create python recipes automatically.

    Check my response here on how to use it.

    I used it to create pyinstaller recipe, it detected that pyinstaller depends, in run time RDEPENDS, on:

    • python3-altgraph
    • python3-pyinstaller-hooks-contrib

    So, here are the recipes:

    python3-pyinstaller_4.5.1.bb

    SUMMARY = "PyInstaller bundles a Python application and all its dependencies into a single package."
    HOMEPAGE = "http://www.pyinstaller.org/"
    AUTHOR = "Hartmut Goebel, Giovanni Bajo, David Vierra, David Cortesi, Martin Zibricky <>"
    LICENSE = "CLOSED"
    
    SRC_URI = "https://files.pythonhosted.org/packages/a9/d9/9fdfb0ac2354d059e466d562689dbe53a23c4062019da2057f0eaed635e0/pyinstaller-4.5.1.tar.gz"
    SRC_URI[md5sum] = "cd1fab890e538ed62ac9121e043632e3"
    SRC_URI[sha256sum] = "30733baaf8971902286a0ddf77e5499ac5f7bf8e7c39163e83d4f8c696ef265e"
    
    S = "${WORKDIR}/pyinstaller-4.5.1"
    
    RDEPENDS_${PN} = "python3-setuptools python3-altgraph python3-pyinstaller-hooks-contrib"
    
    DEPENDS += "python3-wheel python3-wheel-native"
    
    inherit setuptools3
    

    python3-pyinstaller-hooks-contrib_2021.2.bb

    SUMMARY = "Community maintained hooks for PyInstaller"
    HOMEPAGE = "https://github.com/pyinstaller/pyinstaller-hooks-contrib"
    AUTHOR = " <>"
    LICENSE = "CLOSED"
    LIC_FILES_CHKSUM = "file://LICENSE;md5=822bee463f4e00ac4478593130e95ccb"
    
    SRC_URI = "https://files.pythonhosted.org/packages/eb/fa/fe062e44776ab8edb4ac62daca1a02bb744ebdd556ec7a75c19c717e80b4/pyinstaller-hooks-contrib-2021.2.tar.gz"
    SRC_URI[md5sum] = "322f5534dd0df2d3fbb8fd55ec7cddbf"
    SRC_URI[sha256sum] = "7f5d0689b30da3092149fc536a835a94045ac8c9f0e6dfb23ac171890f5ea8f2"
    
    S = "${WORKDIR}/pyinstaller-hooks-contrib-2021.2"
    
    RDEPENDS_${PN} = ""
    
    inherit setuptools3
    

    python3-altgraph_0.17.bb

    SUMMARY = "Python graph (network) package"
    HOMEPAGE = "https://altgraph.readthedocs.io"
    AUTHOR = "Ronald Oussoren <[email protected]>"
    LICENSE = "MIT"
    LIC_FILES_CHKSUM = "file://LICENSE;md5=3590eb8d695bdcea3ba57e74adf8a4ed"
    
    SRC_URI = "https://files.pythonhosted.org/packages/22/5a/ac50b52581bbf0d8f6fd50ad77d20faac19a2263b43c60e7f3af8d1ec880/altgraph-0.17.tar.gz"
    SRC_URI[md5sum] = "9450020282270749db205038b8c90b55"
    SRC_URI[sha256sum] = "1f05a47122542f97028caf78775a095fbe6a2699b5089de8477eb583167d69aa"
    
    S = "${WORKDIR}/altgraph-0.17"
    
    RDEPENDS_${PN} = ""
    
    inherit setuptools3
    

    If you have a custom layer, you can create:

    meta-custom/recipes-python/pyinstaller
    

    and put all three recipes inside that.

    Now, just add python3-pyinstaller to IMAGE_INSTALL :

    IMAGE_INSTALL_append = " python3-pyinstaller"