[oe-commits] [meta-openembedded] 73/79: python-pylint: modifies package bin to match source and adds dependencies

git at git.openembedded.org git at git.openembedded.org
Fri Dec 2 08:48:36 UTC 2016


martin_jansa pushed a commit to branch master-next
in repository meta-openembedded.

commit 2d030aaeb01cc0566e5179facae166d5c0779c25
Author: Daniela Plascencia <daniela.plascencia at linux.intel.com>
AuthorDate: Thu Dec 1 13:24:52 2016 +0000

    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 at linux.intel.com>
    Signed-off-by: Martin Jansa <Martin.Jansa at gmail.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
+}

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list