From 385c5cf99d3ce957693272b733190ae304302103 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 16 Sep 2018 13:07:59 +0200 Subject: Clean up wscript --- wscript | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/wscript b/wscript index 993250a..cc3657d 100644 --- a/wscript +++ b/wscript @@ -1,9 +1,10 @@ #!/usr/bin/env python + import os import subprocess -import waflib.Logs as Logs -import waflib.Options as Options -import waflib.extras.autowaf as autowaf + +from waflib import Logs, Options +from waflib.extras import autowaf # Library and package version (UNIX style major, minor, micro) # major increment <=> incompatible changes @@ -22,10 +23,10 @@ def options(ctx): ctx.load('compiler_c') autowaf.set_options(ctx, test=True) opt = ctx.get_option_group('Configuration options') - opt.add_option('--static', action='store_true', dest='static', - help='build static library') - opt.add_option('--no-shared', action='store_true', dest='no_shared', - help='do not build shared library') + autowaf.add_flags( + opt, + {'static': 'build static library', + 'no-shared': 'do not build shared library'}) def configure(conf): autowaf.display_header('Sratom Configuration') @@ -45,13 +46,10 @@ def configure(conf): autowaf.check_pkg(conf, 'sord-0', uselib_store='SORD', atleast_version='0.14.0', mandatory=True) - autowaf.define(conf, 'SRATOM_VERSION', SRATOM_VERSION) autowaf.set_lib_env(conf, 'sratom', SRATOM_VERSION) conf.write_config_header('sratom_config.h', remove=False) - autowaf.display_summary(conf) - autowaf.display_msg(conf, "Unit tests", bool(conf.env.BUILD_TESTS)) - print('') + autowaf.display_summary(conf, {'Unit tests': bool(conf.env.BUILD_TESTS)}) lib_source = ['src/sratom.c'] -- cgit v1.2.1