diff options
author | Simon Glass | 2019-10-31 07:42:59 -0600 |
---|---|---|
committer | Simon Glass | 2019-11-04 18:15:32 -0700 |
commit | b4cf5f1df741e8781bed6149291823cd1a4b8baa (patch) | |
tree | 3128d78456e1b6877c23b42a59937399cdda839b /scripts | |
parent | 5effab0549da404e0f2c21a3f7585aa643f54fc8 (diff) |
pylibfdt: Convert to Python 3
Build this swig module with Python 3.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/dtc/pylibfdt/Makefile | 2 | ||||
-rw-r--r-- | scripts/dtc/pylibfdt/libfdt.i_shipped | 2 | ||||
-rwxr-xr-x | scripts/dtc/pylibfdt/setup.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/scripts/dtc/pylibfdt/Makefile b/scripts/dtc/pylibfdt/Makefile index 15e66ad44d7..42342c75bb1 100644 --- a/scripts/dtc/pylibfdt/Makefile +++ b/scripts/dtc/pylibfdt/Makefile @@ -21,7 +21,7 @@ quiet_cmd_pymod = PYMOD $@ CPPFLAGS="$(HOSTCFLAGS) -I$(LIBFDT_srcdir)" OBJDIR=$(obj) \ SOURCES="$(PYLIBFDT_srcs)" \ SWIG_OPTS="-I$(LIBFDT_srcdir) -I$(LIBFDT_srcdir)/.." \ - $(PYTHON2) $< --quiet build_ext --inplace + $(PYTHON3) $< --quiet build_ext --inplace $(obj)/_libfdt.so: $(src)/setup.py $(PYLIBFDT_srcs) FORCE $(call if_changed,pymod) diff --git a/scripts/dtc/pylibfdt/libfdt.i_shipped b/scripts/dtc/pylibfdt/libfdt.i_shipped index 76e61e98bdf..53b70f8f5e7 100644 --- a/scripts/dtc/pylibfdt/libfdt.i_shipped +++ b/scripts/dtc/pylibfdt/libfdt.i_shipped @@ -624,7 +624,7 @@ class Fdt(FdtRo): Raises: FdtException if no parent found or other error occurs """ - val = val.encode('utf-8') + '\0' + val = val.encode('utf-8') + b'\0' return check_err(fdt_setprop(self._fdt, nodeoffset, prop_name, val, len(val)), quiet) diff --git a/scripts/dtc/pylibfdt/setup.py b/scripts/dtc/pylibfdt/setup.py index 4f7cf042bfe..992cdec30f5 100755 --- a/scripts/dtc/pylibfdt/setup.py +++ b/scripts/dtc/pylibfdt/setup.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 """ setup.py file for SWIG libfdt |