All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Zambrano <brianz@gmail.com>
To: desai@uni-bremen.de
Cc: yocto@yoctoproject.org
Subject: Re: Installing Python app from source
Date: Thu, 4 Oct 2018 10:32:56 -0600	[thread overview]
Message-ID: <CAE18oz9A=Zwxu9QMzmLugkf3jMvg2yxzSCV8PWbkF9UvgXPWZw@mail.gmail.com> (raw)
In-Reply-To: <000401d45bba$16c6d0c0$44547240$@uni-bremen.de>

[-- Attachment #1: Type: text/plain, Size: 3502 bytes --]

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 <desai@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-bounces@yoctoproject.org <yocto-bounces@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
>

[-- Attachment #2: Type: text/html, Size: 7882 bytes --]

  reply	other threads:[~2018-10-04 16:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-03 22:51 Installing Python app from source Brian Zambrano
2018-10-04  8:13 ` Shantanoo Desai
2018-10-04 16:32   ` Brian Zambrano [this message]
2018-10-04 17:08     ` Shantanoo Desai
2018-10-04 17:48       ` Brian Zambrano
2018-10-05  3:48         ` Outback Dingo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAE18oz9A=Zwxu9QMzmLugkf3jMvg2yxzSCV8PWbkF9UvgXPWZw@mail.gmail.com' \
    --to=brianz@gmail.com \
    --cc=desai@uni-bremen.de \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.