1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-08-31 16:22:36 +02:00

pylibfdt: Convert to Python 3

Build this swig module with Python 3.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2019-10-31 07:42:59 -06:00
parent 5effab0549
commit b4cf5f1df7
6 changed files with 6 additions and 33 deletions

View File

@@ -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)

View File

@@ -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)

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
"""
setup.py file for SWIG libfdt