Thanks very much for this Shan. I have that book and was working through it yesterday, as a matter of fact.
That part which is confusing to me in that recipe is that the SRC_URI points to every single file, there is a "inherit setuptools" line and also a do_install_append. I'm not sure how each of these are working together to get the application installed. I believe that the "inherit setuptools" will automatically run "python setup.py install", but when then is the source code manually copied over? BZ On Thu, Oct 4, 2018 at 2:13 AM Shantanoo Desai <de...@uni-bremen.de> wrote: > Hi Brian, > > > > What you need in the .bb is a runtime-dependency. RDEPENDS_${PN} += “ > ${PYTHON_PN}-flask ${PYTHON_PN}-jinja ${PYTHON_PN}-markdown” and so on. > This will add these modules in the root-filesystem and will be available on > the target. > > > > If you need some basic help with a python recipe, there is a git > repository YoctoCookbook > https://github.com/yoctocookbook/meta-custom/tree/master/recipes-python/python-helloworld > to get you some idea. > > > > Please not I am in no ways a Yocto expert on recipe creations but for the > past few weeks this is what I have been able to discover. Due to lack of > examples on custom recipes in python this is the best I can help you with. > > > > > > Best Regards, > > > > Shan > > > > > > > > *Von:* yocto-boun...@yoctoproject.org <yocto-boun...@yoctoproject.org> *Im > Auft**rag von *Brian Zambrano > *Gesendet:* Donnerstag, 4. Oktober 2018 00:52 > *An:* yocto@yoctoproject.org > *Betreff:* [yocto] Installing Python app from source > > > > I'm trying to install my own Python application from source, and having a > hard time finding resources on how to accomplish it. I'm new to this > ecosystem and am probably missing something fundamental. > > My recipe is structured like this...and my build is configure such that it > does actually find it. > > ├── firmware-1.0 > │ ├── saunders_backend > │ └── saunders_frontend > > └── firmware_1.0.bb > > My application code which is for now just a "hello world" flask > application, is in saunders_backend. The setup.py file in there works as > expected when I use it in on my host machine. > > ├── firmware-1.0 > │ ├── saunders_backend/ > │ │ ├── bin/ > │ │ │ └── server > │ │ ├── MANIFEST.in > │ │ ├── requirements.txt > │ │ ├── saunders_apollo/ > │ │ │ ├── config.py > │ │ │ ├── __init__.py > │ │ │ ├── models.py > │ │ │ ├── static/ > │ │ │ ├── templates/ > │ │ │ └── views.py > │ │ └── setup.py > > │ └── saunders_frontend/ > └── firmware_1.0.bb > > > I've been hacking on the .bb files to get it to install this into the > resulting image. I do have IMAGE_INSTALL_append = " firmware" in the > top-level local.conf. > > > > My primary confusion is that I don't know what I should be using for the > python application. do_install, do_install_append? What should SRC_UIR be? > In effect is that I want the exact same behavior of "cd saunders_backend > && pip install ." My setup.py file has install_requires with a list of > all dependencies, which now is merely Flask. > > > > Pointers would be appreciated. > > BZ >
-- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto