# HG changeset patch # User Edouard Tisserant # Date 1527099765 -7200 # Node ID c76d4be6f4382c6cb187ecd3b39c2837e0cf2d30 # Parent 64268e87613e8a331b577221f19a0f8c336b2b01# Parent 2a8cd24a14caae8f9cc7feab53366224930960a9 Merge diff -r 64268e87613e -r c76d4be6f438 .pylint --- a/.pylint Wed May 23 10:53:57 2018 +0200 +++ b/.pylint Wed May 23 20:22:45 2018 +0200 @@ -110,7 +110,7 @@ # List of additional names supposed to be defined in builtins. Remember that # you should avoid to define new builtins when possible. -additional-builtins=_,website,JS +additional-builtins=_,website,JS,cobalt # List of strings which can identify a callback function by name. A callback # name must start or end with one of those strings. diff -r 64268e87613e -r c76d4be6f438 README.md --- a/README.md Wed May 23 10:53:57 2018 +0200 +++ b/README.md Wed May 23 20:22:45 2018 +0200 @@ -19,7 +19,7 @@ * # Ubuntu/Debian : sudo apt-get install build-essential bison flex autoconf sudo apt-get install python-wxgtk3.0 pyro mercurial -sudo apt-get install python-nevow python-matplotlib python-lxml python-zeroconf +sudo apt-get install python-nevow python-matplotlib python-lxml python-zeroconf python-cycler ``` * Prepare ``` diff -r 64268e87613e -r c76d4be6f438 runtime/xenomai.py --- a/runtime/xenomai.py Wed May 23 10:53:57 2018 +0200 +++ b/runtime/xenomai.py Wed May 23 20:22:45 2018 +0200 @@ -1,16 +1,25 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# +# See COPYING.Runtime file for copyrights details. +# + +from __future__ import absolute_import from ctypes import CDLL, RTLD_GLOBAL, pointer, c_int, POINTER, c_char, create_string_buffer + + def TryPreloadXenomai(): """ Xenomai 3 (at least for version <= 3.0.6) do not handle properly dlclose of shared objects whose dlopen did trigger xenomai_init. - As a workaround, this pre-loads xenomai libraries that need to be + As a workaround, this pre-loads xenomai libraries that need to be initialized and call xenomai_init once for all. - + Xenomai auto init of libs MUST be disabled (see --auto-init-solib in xeno-config) """ try: for name in ["cobalt", "modechk", "copperplate", "alchemy"]: globals()[name] = CDLL("lib"+name+".so", mode=RTLD_GLOBAL) - cobalt.xenomai_init(pointer(c_int(0)), pointer((POINTER(c_char)*2)(create_string_buffer("prog_name"), None))) - except: + cobalt.xenomai_init(pointer(c_int(0)), pointer((POINTER(c_char)*2)(create_string_buffer("prog_name"), None))) + except Exception: pass diff -r 64268e87613e -r c76d4be6f438 tests/tools/check_source.sh --- a/tests/tools/check_source.sh Wed May 23 10:53:57 2018 +0200 +++ b/tests/tools/check_source.sh Wed May 23 20:22:45 2018 +0200 @@ -34,9 +34,11 @@ compile_checks() { - echo "Syntax checking..." + echo "Syntax checking using python ..." py_files=$(find . -name '*.py') + python --version + # remove compiled Python files find . -name '*.pyc' -exec rm -f {} \; @@ -48,6 +50,8 @@ set_exit_error fi done + echo "DONE" + echo "" } # pep8 was renamed to pycodestyle @@ -60,6 +64,8 @@ echo "pep8/pycodestyle is not found" set_exit_error fi + echo -n "pep8 version: " + $pep8 --version } pep8_checks_default() @@ -91,6 +97,9 @@ if [ $? -ne 0 ]; then set_exit_error fi + + echo "DONE" + echo "" } @@ -159,6 +168,9 @@ if [ $? -ne 0 ]; then set_exit_error fi + + echo "DONE" + echo "" } flake8_checks() @@ -172,10 +184,16 @@ return fi + echo -n "flake8 version: " + flake8 --version + flake8 --max-line-length=300 --exclude=build --builtins="_" ./ if [ $? -ne 0 ]; then set_exit_error fi + + echo "DONE" + echo "" } pylint_checks() @@ -188,6 +206,7 @@ set_exit_error return fi + pylint --version export PYTHONPATH="$PWD/../CanFestival-3/objdictgen":$PYTHONPATH @@ -291,6 +310,9 @@ if [ $? -ne 0 ]; then set_exit_error fi + + echo "DONE" + echo "" } main()