summaryrefslogtreecommitdiffstats
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-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 b9219dd28..2e3445100 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 \
22 python-stringold \ 22 python-stringold \
23 python-subprocess \ 23 python-subprocess \
24 python-textutils \ 24 python-textutils \
25 python-unittest" 25 python-unittest \
26 python-backports-functools-lru-cache \
27 python-setuptools \
28 python-astroid \
29 python-wrapt \
30 python-isort \
31 python-lazy-object-proxy \
32 "
26 33
27inherit pypi setuptools 34inherit pypi setuptools
35
36do_install_append(){
37 rm ${D}${bindir}/pylint
38 cat >> ${D}${bindir}/pylint <<EOF
39#!/usr/bin/env python
40from pylint import run_pylint
41run_pylint()
42EOF
43 chmod 755 ${D}${bindir}/pylint
44}