Re: [U-Boot] [PATCH 07/19] fdt: Rename existing python libfdt module

2017-05-02 Thread sjg
Now that this module has been accepted upstream we should stop using the
local U-Boot one. In preparation for this, rename it to indicate it is for
legacy use.

Signed-off-by: Simon Glass 
---

 lib/libfdt/{libfdt.swig => libfdt_legacy.swig} |  3 +--
 lib/libfdt/setup.py|  6 +++---
 tools/Makefile | 11 ++-
 tools/dtoc/fdt_normal.py   |  2 +-
 4 files changed, 11 insertions(+), 11 deletions(-)
 rename lib/libfdt/{libfdt.swig => libfdt_legacy.swig} (98%)

Applied to u-boot-fdt/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 07/19] fdt: Rename existing python libfdt module

2017-04-16 Thread Simon Glass
Now that this module has been accepted upstream we should stop using the
local U-Boot one. In preparation for this, rename it to indicate it is for
legacy use.

Signed-off-by: Simon Glass 
---

 lib/libfdt/{libfdt.swig => libfdt_legacy.swig} |  3 +--
 lib/libfdt/setup.py|  6 +++---
 tools/Makefile | 11 ++-
 tools/dtoc/fdt_normal.py   |  2 +-
 4 files changed, 11 insertions(+), 11 deletions(-)
 rename lib/libfdt/{libfdt.swig => libfdt_legacy.swig} (98%)

diff --git a/lib/libfdt/libfdt.swig b/lib/libfdt/libfdt_legacy.swig
similarity index 98%
rename from lib/libfdt/libfdt.swig
rename to lib/libfdt/libfdt_legacy.swig
index b24c72b1a2..9880dd998e 100644
--- a/lib/libfdt/libfdt.swig
+++ b/lib/libfdt/libfdt_legacy.swig
@@ -1,5 +1,4 @@
-/* File: libfdt.i */
-%module libfdt
+%module libfdt_legacy
 
 %{
 #define SWIG_FILE_WITH_INIT
diff --git a/lib/libfdt/setup.py b/lib/libfdt/setup.py
index 845a0c2b10..fc881351c6 100644
--- a/lib/libfdt/setup.py
+++ b/lib/libfdt/setup.py
@@ -22,17 +22,17 @@ else:
 cflags = None
 
 libfdt_module = Extension(
-'_libfdt',
+'_libfdt_legacy',
 sources = files,
 extra_compile_args =  cflags
 )
 
 sys.argv = [progname, '--quiet', 'build_ext', '--inplace', '--force']
 
-setup (name = 'libfdt',
+setup (name = 'libfdt_legaacy',
version = '0.1',
author  = "SWIG Docs",
description = """Simple swig libfdt from docs""",
ext_modules = [libfdt_module],
-   py_modules = ["libfdt"],
+   py_modules = ["libfdt_legacy"],
)
diff --git a/tools/Makefile b/tools/Makefile
index dadc75b912..cd08d3b33b 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -117,16 +117,17 @@ fit_check_sign-objs   := $(dumpimage-mkimage-objs) 
fit_check_sign.o
 # Build a libfdt Python module if swig is available
 # Use 'sudo apt-get install swig libpython-dev' to enable this
 hostprogs-y += \
-   $(if $(shell which swig 2> /dev/null),_libfdt.so)
-_libfdt.so-sharedobjs += $(LIBFDT_OBJS)
+   $(if $(shell which swig 2> /dev/null),_libfdt_legacy.so)
+_libfdt_legacy.so-sharedobjs += $(LIBFDT_OBJS)
 libfdt:
 
-tools/_libfdt.so: $(patsubst %.o,%.c,$(LIBFDT_OBJS)) tools/libfdt_wrap.c
+tools/_libfdt_legacy.so: $(patsubst %.o,%.c,$(LIBFDT_OBJS)) \
+   tools/libfdt_legacy_wrap.c
LDFLAGS="$(HOSTLDFLAGS)" CFLAGS= ${PYTHON} 
$(srctree)/lib/libfdt/setup.py \
"$(_hostc_flags)" $^
-   mv _libfdt.so $@
+   mv _libfdt_legacy.so $@
 
-tools/libfdt_wrap.c: $(srctree)/lib/libfdt/libfdt.swig
+tools/libfdt_legacy_wrap.c: $(srctree)/lib/libfdt/libfdt_legacy.swig
swig -python -o $@ $<
 
 # TODO(s...@chromium.org): Is this correct on Mac OS?
diff --git a/tools/dtoc/fdt_normal.py b/tools/dtoc/fdt_normal.py
index cce5c06d8c..17b0a9a726 100644
--- a/tools/dtoc/fdt_normal.py
+++ b/tools/dtoc/fdt_normal.py
@@ -12,7 +12,7 @@ import sys
 import fdt
 from fdt import Fdt, NodeBase, PropBase
 import fdt_util
-import libfdt
+import libfdt_legacy as libfdt
 
 # This deals with a device tree, presenting it as a list of Node and Prop
 # objects, representing nodes and properties, respectively.
-- 
2.12.2.762.g0e3151a226-goog

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot