Skip to content

Commit 348a30e

Browse files
committed
use 'true' and 'false' as values for %(rpath)s template
1 parent 7c2641d commit 348a30e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

easybuild/framework/easyconfig/templates.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
('cuda_sm_space_sep', "Space-separated list of sm_* values that correspond with CUDA compute capabilities"),
102102
('mpi_cmd_prefix', "Prefix command for running MPI programs (with default number of ranks)"),
103103
# can't be a boolean (True/False), must be a string value since it's a string template
104-
('rpath', "String value indicating whether or not RPATH linking is used ('yes' or 'no')"),
104+
('rpath', "String value indicating whether or not RPATH linking is used ('true' or 'false')"),
105105
('software_commit', "Git commit id to use for the software as specified by --software-commit command line option"),
106106
('sysroot', "Location root directory of system, prefix for standard paths like /usr/lib and /usr/include"
107107
"as specified by the --sysroot configuration option"),
@@ -211,7 +211,7 @@ def template_constant_dict(config, ignore=None, skip_lower=None, toolchain=None)
211211
template_values['arch'] = platform.uname()[4]
212212

213213
# set 'rpath' template based on 'rpath' configuration option, using empty string as fallback
214-
template_values['rpath'] = 'yes' if build_option('rpath') else 'no'
214+
template_values['rpath'] = 'true' if build_option('rpath') else 'false'
215215

216216
# set 'sysroot' template based on 'sysroot' configuration option, using empty string as fallback
217217
template_values['sysroot'] = build_option('sysroot') or ''

test/framework/easyconfig.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,18 +1434,18 @@ def test_rpath_template(self):
14341434
write_file(test_ec, test_ec_txt)
14351435

14361436
ec = EasyConfig(test_ec)
1437-
expected = '--with-rpath=yes' if get_os_name() == 'Linux' else '--with-rpath=no'
1437+
expected = '--with-rpath=true' if get_os_name() == 'Linux' else '--with-rpath=false'
14381438
self.assertEqual(ec['configopts'], expected)
14391439

14401440
# force True
14411441
update_build_option('rpath', True)
14421442
ec = EasyConfig(test_ec)
1443-
self.assertEqual(ec['configopts'], "--with-rpath=yes")
1443+
self.assertEqual(ec['configopts'], "--with-rpath=true")
14441444

14451445
# force False
14461446
update_build_option('rpath', False)
14471447
ec = EasyConfig(test_ec)
1448-
self.assertEqual(ec['configopts'], "--with-rpath=no")
1448+
self.assertEqual(ec['configopts'], "--with-rpath=false")
14491449

14501450
def test_sysroot_template(self):
14511451
"""Test the %(sysroot)s template"""
@@ -3389,7 +3389,7 @@ def test_template_constant_dict(self):
33893389

33903390
arch_regex = re.compile('^[a-z0-9_]+$')
33913391

3392-
rpath = 'yes' if get_os_name() == 'Linux' else 'no'
3392+
rpath = 'true' if get_os_name() == 'Linux' else 'false'
33933393

33943394
expected = {
33953395
'bitbucket_account': 'gzip',

0 commit comments

Comments
 (0)