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
[email protected]

Reply via email to