# HG changeset patch # User Edouard Tisserant # Date 1528698855 -7200 # Node ID bcf346f558bda676fd2c4197cc8bc933dd0d333f # Parent c76d4be6f4382c6cb187ecd3b39c2837e0cf2d30# Parent 6dddf3070806f9599ca481b57da814376e42c0e7 merge diff -r 6dddf3070806 -r bcf346f558bd .pylint --- a/.pylint Fri Jun 08 13:28:00 2018 +0200 +++ b/.pylint Mon Jun 11 08:34:15 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 6dddf3070806 -r bcf346f558bd README.md --- a/README.md Fri Jun 08 13:28:00 2018 +0200 +++ b/README.md Mon Jun 11 08:34:15 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 6dddf3070806 -r bcf346f558bd runtime/xenomai.py --- a/runtime/xenomai.py Fri Jun 08 13:28:00 2018 +0200 +++ b/runtime/xenomai.py Mon Jun 11 08:34:15 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 6dddf3070806 -r bcf346f558bd tests/tools/check_source.sh --- a/tests/tools/check_source.sh Fri Jun 08 13:28:00 2018 +0200 +++ b/tests/tools/check_source.sh Mon Jun 11 08:34:15 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()