aboutsummaryrefslogtreecommitdiff
path: root/wscript
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-06-07 13:05:01 +0200
committerDavid Robillard <d@drobilla.net>2020-06-13 17:18:21 +0200
commitf036af07f7eb8ccb14fc3c4389f509367b9a3802 (patch)
tree615255242e6dfa567aae0dbf66f9c67b47c8050d /wscript
parenteb85b35c6e5a59bf2e7d0fba222d6e47bae730a3 (diff)
Cleanup: Fix flake8 warnings
Diffstat (limited to 'wscript')
-rw-r--r--wscript9
1 files changed, 6 insertions, 3 deletions
diff --git a/wscript b/wscript
index 3471a4b..a3ddb45 100644
--- a/wscript
+++ b/wscript
@@ -230,7 +230,9 @@ def build(bld):
'install_path': '${LIBDIR}',
'vnum': PUGL_VERSION})
- flags = [] if bld.env.MSVC_COMPILER else ['-fPIC', '-fvisibility=hidden']
+ flags = []
+ if not bld.env.MSVC_COMPILER:
+ flags = ['-fPIC', '-fvisibility=hidden']
if bld.env.BUILD_SHARED:
bld(features = 'c cshlib',
@@ -358,7 +360,7 @@ def build(bld):
target = 'shaders/%s' % s)
if bld.env.HAVE_GL:
- glad_cflags = ['-Wno-pedantic'] if not bld.env.MSVC_COMPILER else []
+ glad_cflags = [] if bld.env.MSVC_COMPILER else ['-Wno-pedantic']
build_example('pugl_embed_demo', ['examples/pugl_embed_demo.c'],
platform, 'gl', uselib=['GL', 'M'])
build_example('pugl_window_demo', ['examples/pugl_window_demo.c'],
@@ -409,7 +411,7 @@ def lint(ctx):
import json
import subprocess
- subprocess.call("flake8 wscript --ignore E221,W504,E251,E241",
+ subprocess.call("flake8 wscript --ignore E221,W504,E251,E241,E741",
shell=True)
with open('build/compile_commands.json', 'r') as db:
@@ -430,6 +432,7 @@ def lint(ctx):
except Exception:
Logs.warn('Failed to call iwyu_tool.py')
+
# Alias .m files to be compiled like .c files, gcc will do the right thing.
@TaskGen.extension('.m')
def m_hook(self, node):