* Add flake8 configuration
.flake8:
Add flake8 configuration that limits the line length to 120 chars and
outputs to flake8.txt
* Add flake8.txt to gitignore
.gitignore:
Add flake8.txt (flake8 output file) to ignore.
* Syntax fixes and cleanup for top-level wscript
wscript:
Fix syntax of wscript according to pep8 (but do not break long lines).
Remove unused imports and move all module level imports to the top of
the file.
Fix broken build target of IIO driver (source argument to
`create_driver_obj()` supplied an uninitialized variable).
Break lines at 120 chars.
* Fix common/wscript syntax
common/wscript:
Fix syntax problems, unneeded imports and break lines at 120 chars.
* Fix compat/alloca/wscript syntax
compat/alloca/wscript:
Fix compat/alloca/wscript syntax
* Fix compat/wscript syntax
compat/wscript:
Fix compat/wscript syntax
* Fix dbus/wscript syntax
dbus/wscript:
Fix syntax and break lintes at 120 chars.
* Fix example-clients/wscript syntax
example-clients/wscript:
Fix syntax and remove commented code.
* Fix tests/wscript syntax
tests/wscript:
Fix syntax and commented code.
* Fix tools/wscript syntax
tools/wscript:
Fix tools/wscript syntax.
* Add github workflow for linting wscripts
.github/workflows/lint.yml:
Add github workflow for linting wscripts using findutils and flake8.
* Fix project version extraction in CI
.github/workflows/build.yml:
Adapt the project version extraction in CI to the syntax changes in
the top-level wscript.
It uses c++ sources and runtime therefore its best to use c++ compiler
to build it so it can find the correct runtime, cross compiling with
clang fails
x86_64-yoe-linux-ld: example-clients/simdtests.cpp.28.o: undefined reference to symbol '__cxa_call_unexpected@@CXXABI_1.3'
Signed-off-by: Khem Raj <raj.khem@gmail.com>
waf complains about missing features in the builder, so let's add some.
For the sake of completeness, here's an example error message:
Traceback (most recent call last):
File "/home/adi/jack2/.waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Runner.py", line 162, in start
st=tsk.runnable_status()
File "/home/adi/jack2/.waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Task.py", line 285, in runnable_status
new_sig=self.signature()
File "/home/adi/jack2/.waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Task.py", line 274, in signature
self.sig_implicit_deps()
File "/home/adi/jack2/.waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Task.py", line 372, in sig_implicit_deps
(nodes,names)=self.scan()
File "/home/adi/jack2/.waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Tools/c_preproc.py", line 594, in scan
raise Errors.WafError('%r is missing a feature such as "c", "cxx" or "includes": '%task.generator)
WafError: bld(uselib_local='clientlib', posted=True, features=[], idx=28, uselib='RT SNDFILE', meths=['process_rule', 'process_source'], prec=defaultdict(<type 'list'>, {}), includes=['../linux', '../posix', '../common/jack', '../common'], source=[/home/adi/jack2/example-clients/capture_client.c], mappings={}, path=/home/adi/jack2/example-clients, _name='jack_rec', target='jack_rec') in /home/adi/jack2/example-clients is missing a feature such as "c", "cxx" or "includes":