From 0e3e51d958876a0a597fae0b8a904e42a1475d20 Mon Sep 17 00:00:00 2001 From: Mads Kiilerich Date: Sat, 15 Oct 2022 14:05:36 +0200 Subject: [PATCH] wscript: drop str() on VERSION It will already have been converted to str in sanitize(), and even python2 is fine without the extra str. --- gtk2_ardour/wscript | 10 +++++----- headless/wscript | 4 ++-- libs/auscan/wscript | 2 +- libs/fst/wscript | 4 ++-- luasession/wscript | 2 +- session_utils/wscript | 2 +- tools/bb/wscript | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/gtk2_ardour/wscript b/gtk2_ardour/wscript index 1d552f7303..4a712942fe 100644 --- a/gtk2_ardour/wscript +++ b/gtk2_ardour/wscript @@ -479,7 +479,7 @@ def configure(conf): conf.write_config_header('gtk2ardour-config.h', remove=False) bak = conf.env['define_key'] - conf.define('VERSIONSTRING', str (conf.env['VERSION'])) + conf.define('VERSIONSTRING', conf.env['VERSION']) conf.define('CODENAME', enoify(int(conf.env['MAJOR']), int(conf.env['MINOR']))) conf.env['define_key'] = ['VERSIONSTRING', 'CODENAME' ] conf.write_config_header('gtk2ardour-version.h') @@ -575,7 +575,7 @@ def build(bld): # operate on copy to avoid adding sources twice obj.source = list(gtk2_ardour_sources) - obj.target = 'ardour-' + str (bld.env['VERSION']) + obj.target = 'ardour-' + bld.env['VERSION'] obj.includes = ['.'] if bld.is_defined('WINDOWS_VST_SUPPORT'): @@ -678,8 +678,8 @@ def build(bld): 'DATADIR' : os.path.normpath(bld.env['DATADIR']), 'CONFDIR' : os.path.normpath(bld.env['CONFDIR']), 'LIBS' : 'build/libs', - 'VERSION' : str (bld.env['VERSION']), - 'EXECUTABLE' : 'build/gtk2_ardour/ardour-' + str (bld.env['VERSION']) + 'VERSION' : bld.env['VERSION'], + 'EXECUTABLE' : 'build/gtk2_ardour/ardour-' + bld.env['VERSION'] } def set_subst_dict(obj, dict): @@ -829,7 +829,7 @@ def build(bld): freedesktop_subst_dict = { 'ARDOUR_EXEC' : str (bld.env['lwrcase_dirname']), 'ARDOUR_ICON' : str (bld.env['lwrcase_dirname']), - 'VERSION': str (bld.env['VERSION']), + 'VERSION': bld.env['VERSION'], 'DATE': str (bld.env['DATE']), } diff --git a/headless/wscript b/headless/wscript index 32d2e00036..77b39b6877 100644 --- a/headless/wscript +++ b/headless/wscript @@ -19,7 +19,7 @@ def build(bld): # this program does not do the whole hidden symbols thing obj.cxxflags = [ '-fvisibility=default' ] obj.source = hardour_sources - obj.target = 'hardour-' + str (bld.env['VERSION']) + obj.target = 'hardour-' + bld.env['VERSION'] obj.includes = ['.'] obj.use = [ 'libpbd', 'libardour', @@ -29,7 +29,7 @@ def build(bld): ] obj.defines = [ - 'VERSIONSTRING="' + str(bld.env['VERSION']) + '"', + 'VERSIONSTRING="' + bld.env['VERSION'] + '"', 'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"', 'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"', 'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"', diff --git a/libs/auscan/wscript b/libs/auscan/wscript index 0e2bc35687..c77782241a 100644 --- a/libs/auscan/wscript +++ b/libs/auscan/wscript @@ -18,7 +18,7 @@ def build(bld): obj.includes = [ '../pbd/', '../ardour/', '..' ] obj.defines = [ 'AU_SCANNER_APP', - 'VERSIONSTRING="' + str(bld.env['VERSION']) + '"', + 'VERSIONSTRING="' + bld.env['VERSION'] + '"', 'PACKAGE="' + I18N_PACKAGE + str(bld.env['MAJOR']) + '"', 'LIBARDOUR="' + bld.env['lwrcase_dirname'] + '"', 'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"', diff --git a/libs/fst/wscript b/libs/fst/wscript index bed56ec731..dcdad8e4c0 100644 --- a/libs/fst/wscript +++ b/libs/fst/wscript @@ -21,7 +21,7 @@ def build(bld): obj.includes = [ '../pbd/', '../ardour/', '../vst3/', '..' ] obj.defines = [ 'VST3_SCANNER_APP', - 'VERSIONSTRING="' + str(bld.env['VERSION']) + '"', + 'VERSIONSTRING="' + bld.env['VERSION'] + '"', 'PACKAGE="' + I18N_PACKAGE + str(bld.env['MAJOR']) + '"', 'LIBARDOUR="' + bld.env['lwrcase_dirname'] + '"', 'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"', @@ -66,7 +66,7 @@ def build(bld): 'VST_SCANNER_APP', 'PACKAGE="' + I18N_PACKAGE + str(bld.env['MAJOR']) + '"', 'LIBARDOUR="' + bld.env['lwrcase_dirname'] + '"', - 'VERSIONSTRING="' + str(bld.env['VERSION']) + '"', + 'VERSIONSTRING="' + bld.env['VERSION'] + '"', ] if re.search ("bsd", sys.platform) != None: obj.defines.append('_POSIX_C_SOURCE=200809') diff --git a/luasession/wscript b/luasession/wscript index 5e85a9a6fd..578d0bebc5 100644 --- a/luasession/wscript +++ b/luasession/wscript @@ -42,7 +42,7 @@ def build(bld): 'libmidipp', ] obj.defines = [ - 'VERSIONSTRING="' + str(bld.env['VERSION']) + '"', + 'VERSIONSTRING="' + bld.env['VERSION'] + '"', 'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"', 'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"', 'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"', diff --git a/session_utils/wscript b/session_utils/wscript index d8a3ac491a..b33f9b35cc 100644 --- a/session_utils/wscript +++ b/session_utils/wscript @@ -32,7 +32,7 @@ def build_ardour_util(bld, util): 'libmidipp', ] obj.defines = [ - 'VERSIONSTRING="' + str(bld.env['VERSION']) + '"', + 'VERSIONSTRING="' + bld.env['VERSION'] + '"', 'UTILNAME="' + str(pgmprefix + '-' + util) + '"', 'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"', 'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"', diff --git a/tools/bb/wscript b/tools/bb/wscript index 2cd093a879..91d22f6c85 100644 --- a/tools/bb/wscript +++ b/tools/bb/wscript @@ -23,7 +23,7 @@ def build(bld): 'DATADIR' : os.path.normpath(bld.env['DATADIR']), 'CONFDIR' : os.path.normpath(bld.env['CONFDIR']), 'LIBS' : 'build/libs', - 'VERSION' : str (bld.env['VERSION']), + 'VERSION' : bld.env['VERSION'], 'EXECUTABLE' : 'build/tools/bb/bb' }