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:
@@ -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)
|
||||
|
@@ -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)
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python2
|
||||
#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
setup.py file for SWIG libfdt
|
||||
|
Reference in New Issue
Block a user