Exclude pyjslib.py from python3 syntax correction check
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Wed, 13 Mar 2019 10:02:11 +0300
changeset 2535 0fab0af57950
parent 2534 47ca468ebcbe
child 2536 2747d6e72eb8
Exclude pyjslib.py from python3 syntax correction check

pyjs doesn't support python3 and it's unmaintained.
async is a new keyword introduced in python 3.7.

./tests/tools/check_source.sh
Syntax checking using python3 ...
Python 3.7.2+

Syntax error in ./runtime/Worker.py
File "./svgui/pyjs/lib/pyjslib.py", line 24
def import_module(path, parent_module, module_name, dynamic=1, async=False):
^
SyntaxError: invalid syntax
tests/tools/check_source.sh
--- a/tests/tools/check_source.sh	Wed Mar 13 09:56:37 2019 +0300
+++ b/tests/tools/check_source.sh	Wed Mar 13 10:02:11 2019 +0300
@@ -66,7 +66,7 @@
     # remove compiled Python files
     find . -name '*.pyc' -exec rm -f {} \;
 
-    for i in $py_files; do
+    for i in $py3_files; do
         # echo $i
         python3 -m py_compile $i
         if [ $? -ne 0 ]; then
@@ -444,6 +444,8 @@
         echo "No files to check"
         exit 0;
     fi
+
+    py3_files=$(echo $py_files | sed 's/ [a-Z\/\.]*pyjslib.py//')
 }