mirror of
https://github.com/dgibson/dtc.git
synced 2026-10-09 23:53:08 -04:00
pylibfdt: Allow switch to Python 3 via environment variable PYTHON
Python 2 is still the default but it can be changed by setting environment variable PYTHON before build/test. Signed-off-by: Lumir Balhar <lbalhar@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
11738cf01f
commit
8113c00b99
4 changed files with 8 additions and 7 deletions
3
Makefile
3
Makefile
|
|
@ -24,6 +24,7 @@ BISON = bison
|
|||
LEX = flex
|
||||
SWIG = swig
|
||||
PKG_CONFIG ?= pkg-config
|
||||
PYTHON ?= python2
|
||||
|
||||
INSTALL = /usr/bin/install
|
||||
INSTALL_PROGRAM = $(INSTALL)
|
||||
|
|
@ -147,7 +148,7 @@ all: $(BIN) libfdt
|
|||
# We need both Python and swig to build/install pylibfdt.
|
||||
# This builds the given make ${target} if those deps are found.
|
||||
check_python_deps = \
|
||||
if $(PKG_CONFIG) --cflags python2 >/dev/null 2>&1; then \
|
||||
if $(PKG_CONFIG) --cflags $(PYTHON) >/dev/null 2>&1; then \
|
||||
if which swig >/dev/null 2>&1; then \
|
||||
can_build=yes; \
|
||||
fi; \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue