From: Daniela Plascencia <daniela.plascen...@linux.intel.com>

The pylint script mismatches from source in the target, producing runtime
errors, such as:
    "pkg_resources.DistributionNotFound: The 'configparser'
     was not found and is required by pylint"
This exception is raised mainly because pkg_resources, which is used by
pylint, looks for modules named as in Py3, but the target has only Py2.
For instance, 'ConfigParser' (already installed), has been renamed to
'configparser' in Py3, and thus not found by pkg_resources.
To ensure none of these compatibility issues happen, the pylint script
handles all the imports.
Thus, /usr/bin/pylint has to be installed in the same fashion as in
source, and the recipe in this patch states the content of such script
and deletes the previous one.

Also, a set of runtime dependencies is added to the recipe.

Signed-off-by: Daniela Plascencia <daniela.plascen...@linux.intel.com>
---
 .../recipes-devtools/python/python-pylint_1.6.4.bb    | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/meta-python/recipes-devtools/python/python-pylint_1.6.4.bb 
b/meta-python/recipes-devtools/python/python-pylint_1.6.4.bb
index b9219dd..2e34451 100644
--- a/meta-python/recipes-devtools/python/python-pylint_1.6.4.bb
+++ b/meta-python/recipes-devtools/python/python-pylint_1.6.4.bb
@@ -22,6 +22,23 @@ RDEPENDS_${PN} += "python-codecs \
                    python-stringold \
                    python-subprocess \
                    python-textutils \
-                   python-unittest"
+                   python-unittest \
+                   python-backports-functools-lru-cache \
+                   python-setuptools \
+                   python-astroid \
+                   python-wrapt \
+                   python-isort \
+                   python-lazy-object-proxy \
+                   "
 
 inherit pypi setuptools
+
+do_install_append(){
+    rm ${D}${bindir}/pylint
+    cat >> ${D}${bindir}/pylint <<EOF
+#!/usr/bin/env python
+from pylint import run_pylint
+run_pylint()
+EOF
+    chmod 755 ${D}${bindir}/pylint
+}
-- 
2.6.6

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Reply via email to