mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] host-python
Date: Mon, 15 Feb 2016 10:46:02 +0100	[thread overview]
Message-ID: <20160215094602.GE23517@pengutronix.de> (raw)
In-Reply-To: <56C19C35.3070206@erwinrol.com>

On Mon, Feb 15, 2016 at 10:36:53AM +0100, Erwin Rol wrote:
> On 15-2-2016 9:48, Michael Olbrich wrote:
> > Hi,
> > 
> > On Thu, Feb 11, 2016 at 02:42:19PM +0100, Erwin Rol wrote:
> >> The host-python package removes the "python" file after install with the
> >> following reason;
> >>
> >> # remove "python" so that it doesn't interfere with the build
> >> # machine's python
> >> #
> >> # the target build proces will only use python with the
> >> # python-$(PYTHON_MAJORMINOR)
> >>
> >> But isn't the reason of wanting host-python that the real host python
> >> isn't good enough (wrong version) ?
> >>
> >> So I don't really understand the idea behind using host-python and than
> >> "breaking" it so it doesn't get found unless you change every reference
> >> to "python" into "pyhton-2"
> >>
> >> Do things break when "python" from host-python is found ?
> > 
> > This stuff is a bit tricky:
> 
> Yep I noticed that, my not deleting python hack broke ptxdist due to
> missing imports.
> 
> > We have the Python 2.x installed in the system by your distribution.
> > PTXdist does the basic check for this in it's configure script.
> > This is for any package that uses Python in it's build process but not on
> > the target and works with any recent Python 2.x version.
> > If extra modules are needed, they are handled by the host-system-python
> > package.
> 
> My real-host (redhat/centos 6) python is to old (2.6), qt5 needs 2.7.

I see. I would accept a patch for an option to use host-python for
host-system-python.

> > Then we have host-python. This is used for anything that is related to
> > Python on the target. Usually that means packages that install Python
> > modules on the target.
> > 
> > We could use host-python for everything, but that would mean, that we need
> > to compile it for basically every BSP and add a lot of host Python modules.
> > I'd like to avoid that.
> > 
> > In the first case, there are usually scripts with "/usr/bin/env python" as
> > shebang, so the 'python' used for this should be the first in $PATH.
> > For the second case we can usually specify the python binary, because we're
> > building for a specific version.
> > By deleting the 'python' link for host-python we can handle both cases.
> 
> I now tricked it by making a sym-link to the host-python 2.7 exe in the
> qt5 build directory and change the QT5_PATH in the qt5.make file. That
> way it seems host-python is only picked up when building qt5
> (qtwebengine needs it). This probably only works because qt5/webengine
> uses the "/usr/bin/env python" construct.

Actually, that should work with most packages. For some distros 'python' is
python3 and we use the symlink <ptxdist>/bin/python to provice the correct
python version.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

      reply	other threads:[~2016-02-15  9:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-11 13:42 Erwin Rol
2016-02-15  8:48 ` Michael Olbrich
2016-02-15  9:36   ` Erwin Rol
2016-02-15  9:46     ` Michael Olbrich [this message]

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=20160215094602.GE23517@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox