pythonpipyoctopypipex

how to include python pex package in yocto image


I need to include python pex package into my yocto image.

I tried to use setupautotools and pypi package, it did not provide results.

The python pex is not available as pypi package.

Can someone help including python pex into my yocto image.

Link for pex: https://pypi.org/project/pex/#description

Is there any way to install pex without pip?

Updated question: I need to install pex package mentioned in the link into my yocto image. The pex package is not available in git repository like wheel https://github.com/pypa/wheel. Due to this reason i am not able to use "inherit pypi setuptools" in .bb files in yocto recipe.


Solution

  • I think everything you need to write as the other python package are already there.

    https://github.com/pantsbuild/pex is the github repo

    https://pypi.python.org/pypi/pex is the pypi package

    You need something similar to:

    SUMMARY = "pex is a library for generating .pex (Python EXecutable) files which are executable Python environments in the spirit of virtualenvs."
    HOMEPAGE = "https://github.com/pantsbuild/pex"
    SECTION = "devel/python"
    LICENSE = ""
    LIC_FILES_CHKSUM = "file://LICENSE;md5=0123"
    
    SRC_URI[md5sum] = "0123"
    SRC_URI[sha256sum] = "0123"
    
    PYPI_PACKAGE="pex"
    
    inherit pypi 
    
    RDEPENDS_${PN} = "\
        ${PYTHON_PN}-core \
    "
    
    BBCLASSEXTEND = "native nativesdk"