Skip to contentSkip to conversation

recipetool: create: fix failure handling included dicts

PATCH New Paul Eggleton 1 participant 2 messages Nov 12, 2017

lore
Share & tools
lore
#0 lore raw

cover recipetool: create: fix failure handling included dicts

The following changes since commit a17f3ec910366e9e7551fa24fbc07929b9584341:

dhcp: fix build issue with libxml2 support (2017-11-10 14:44:31 +0000)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib paule/recipetool-fix2
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=paule/recipetool-fix2

Paul Eggleton (1):
recipetool: create: fix failure handling included dicts

 scripts/lib/recipetool/create_buildsys_python.py | 2 ++
 1 file changed, 2 insertions(+)
Signature · 1 line
2.9.5
#1 lore raw

PATCH 1/1 recipetool: create: fix failure handling included dicts

If a setup dict in a python setup.py file pulled in the contents of another dict (e.g. **otherdict), then we got an error when mapping the keys because the key is None in that case. Skip those keys to avoid the error (we pick up the values directly in any case).

A quick reproducer for this issue:

recipetool create https://files.pythonhosted.org/packages/source/p/pyqtgraph/pyqtgraph-0.10.0.tar.gz

---
 scripts/lib/recipetool/create_buildsys_python.py | 2 ++
 1 file changed, 2 insertions(+)
scripts/lib/recipetool/create_buildsys_python.py +2 -0
index ec5449b..5bd2aa3 100644
@@ -356,6 +356,8 @@ class PythonRecipeHandler(RecipeHandler):
         # Naive mapping of setup() arguments to PKG-INFO field names
         for d in [info, non_literals]:
             for key, value in list(d.items()):
+                if key is None:
+                    continue
                 new_key = _map(key)
                 if new_key != key:
                     del d[key]
Signature · 1 line
2.9.5