From: Tom Rini Date: Sun, 20 Aug 2017 19:29:06 -0400 Subject: [U-Boot] [U-Boot, v3] Makefile: honor PYTHON configuration properly In-Reply-To: <20170814065911.5806-1-u@pkh.me> References: <20170814065911.5806-1-u@pkh.me> Message-ID: <20170820232906.GQ17193@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: u-boot@lists.denx.de On Mon, Aug 14, 2017 at 08:59:11AM +0200, Clément Bœsch wrote: > On some systems `python` is `python3` (for instance, Archlinux). The > `PYTHON` variable can be used to point to `python2` to have a successful > build. > > The use of `PYTHON` is currently limited in the Makefile and needs to be > extended in other places: > > First, pylibfdt is required to be a Python 2 binding (binman imports > pylibfdt and is only compatible Python 2), so its setup.py needs to be > called accordingly. An alternative would be to change the libfdt > setup.py shebang to python2, but the binding is actually portable. Also, > it would break on system where there is no such thing as `python2`. > > Secondly, the libfdt import checks need to be done against Python 2 as > well since the Python 2 compiled modules (in this case _libdft.so) can > not be imported from Python 3. > > Note on the libfdt imports: "@if ! PYTHONPATH=tools $(PYTHON) -c 'import > libfdt'; then..." is probably simpler than the currently sub-optimal > pipe. > Reviewed-by: Jonathan Gray Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: