aboutsummaryrefslogtreecommitdiffstats
path: root/meta-python
diff options
context:
space:
mode:
authorDaniela Plascencia <daniela.plascencia@linux.intel.com>2016-12-01 13:24:52 +0000
committerMartin Jansa <Martin.Jansa@gmail.com>2016-12-09 12:02:19 +0100
commitd9b5870edaddee69612dada2aa4bc2d8c3f70f44 (patch)
tree6c68e9b75ca91b14eb00eaff902bb99c87d625e1 /meta-python
parentd83612a1e750b98b1c537fada777d615d9d6628a (diff)
downloadmeta-openembedded-contrib-d9b5870edaddee69612dada2aa4bc2d8c3f70f44.tar.gz
python-pylint: modifies package bin to match source and adds dependencies
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.plascencia@linux.intel.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-python')
-rw-r--r--meta-python/recipes-devtools/python/python-pylint_1.6.4.bb19
1 files changed, 18 insertions, 1 deletions
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 b9219dd28e..2e34451009 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
+}