Skip to content

Commit 91ac324

Browse files
committed
Replace extra_configure_args by configure_args
Signed-off-by: Uilian Ries <[email protected]>
1 parent aa77804 commit 91ac324

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

conan/internal/model/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
"tools.gnu:pkg_config": "Path to pkg-config executable used by PkgConfig build helper",
102102
"tools.gnu:build_triplet": "Custom build triplet to pass to Autotools scripts",
103103
"tools.gnu:host_triplet": "Custom host triplet to pass to Autotools scripts",
104-
"tools.gnu:extra_configure_args": "List of extra arguments to pass to configure when using AutotoolsToolchain and GnuToolchain",
104+
"tools.gnu:configure_args": "List of extra arguments to pass to configure when using AutotoolsToolchain and GnuToolchain",
105105
"tools.google.bazel:configs": "List of Bazel configurations to be used as 'bazel build --config=config1 ...'",
106106
"tools.google.bazel:bazelrc_path": "List of paths to bazelrc files to be used as 'bazel --bazelrc=rcpath1 ... build'",
107107
"tools.meson.mesontoolchain:backend": "Any Meson backend: ninja, vs, vs2010, vs2012, vs2013, vs2015, vs2017, vs2019, xcode",

conan/tools/gnu/autotoolstoolchain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def __init__(self, conanfile, namespace=None, prefix="/"):
8383
sysroot = self._conanfile.conf.get("tools.build:sysroot")
8484
sysroot = sysroot.replace("\\", "/") if sysroot is not None else None
8585
self.sysroot_flag = "--sysroot {}".format(sysroot) if sysroot else None
86-
extra_configure_args = self._conanfile.conf.get("tools.gnu:extra_configure_args",
86+
extra_configure_args = self._conanfile.conf.get("tools.gnu:configure_args",
8787
check_type=list,
8888
default=[])
8989

conan/tools/gnu/gnutoolchain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def __init__(self, conanfile, namespace=None, prefix="/"):
6262
self.fpic = self._conanfile.options.get_safe("fPIC")
6363
self.msvc_runtime_flag = self._get_msvc_runtime_flag()
6464
self.msvc_extra_flags = self._msvc_extra_flags()
65-
extra_configure_args = self._conanfile.conf.get("tools.gnu:extra_configure_args",
65+
extra_configure_args = self._conanfile.conf.get("tools.gnu:configure_args",
6666
check_type=list,
6767
default=[])
6868
extra_configure_args = {it: None for it in extra_configure_args}

test/unittests/client/toolchain/autotools/autotools_toolchain_test.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -607,8 +607,8 @@ def test_conf_compiler_executable():
607607
assert "/c/my/path/myg++" == env["CXX"]
608608

609609

610-
def test_autotools_toolchain_conf_extra_configure_args():
611-
"""Validate that tools.gnu:extra_configure_args are passed to configure command only.
610+
def test_autotools_toolchain_conf_configure_args():
611+
"""Validate that tools.gnu:configure_args are passed to configure command only.
612612
613613
The configure args should be passed as list only.
614614
"""
@@ -617,7 +617,7 @@ def test_autotools_toolchain_conf_extra_configure_args():
617617
conanfile = ConanFileMock()
618618
conanfile.settings = MockSettings({"os": "Linux", "arch": "x86_64"})
619619
conanfile.conf = Conf()
620-
conanfile.conf.define("tools.gnu:extra_configure_args", ["--foo", "--bar"])
620+
conanfile.conf.define("tools.gnu:configure_args", ["--foo", "--bar"])
621621

622622
be = AutotoolsToolchain(conanfile)
623623
be.generate_args()
@@ -626,8 +626,8 @@ def test_autotools_toolchain_conf_extra_configure_args():
626626
# make sure it does not forward to make
627627
assert "--foo" not in obj["make_args"]
628628

629-
conanfile.conf.define("tools.gnu:extra_configure_args", "--foo --bar")
629+
conanfile.conf.define("tools.gnu:configure_args", "--foo --bar")
630630
with pytest.raises(ConanException) as expected:
631631
AutotoolsToolchain(conanfile)
632-
assert "[conf] tools.gnu:extra_configure_args must be a list-like object. "\
632+
assert "[conf] tools.gnu:configure_args must be a list-like object. "\
633633
"The value '--foo --bar' introduced is a str object" in str(expected)

test/unittests/tools/gnu/test_gnutoolchain.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -237,22 +237,22 @@ def test_crossbuild_to_android(build_env_mock):
237237
assert env_vars["STRIP"] == os.path.join(ndk_bin, "llvm-strip") # does not exist but appears
238238

239239

240-
def test_gnu_toolchain_conf_extra_configure_args():
241-
""" Validate that tools.gnu:extra_configure_args are passed to the configure_args when
240+
def test_gnu_toolchain_conf_configure_args():
241+
""" Validate that tools.gnu:configure_args are passed to the configure_args when
242242
building with GnuToolchain.
243243
The configure args should be passed as a list-like object.
244244
"""
245245
conanfile = ConanFileMock()
246246
conanfile.settings = MockSettings({"os": "Linux", "arch": "x86_64"})
247247
conanfile.conf = Conf()
248-
conanfile.conf.define("tools.gnu:extra_configure_args", ["--foo", "--bar"])
248+
conanfile.conf.define("tools.gnu:configure_args", ["--foo", "--bar"])
249249

250250
tc = GnuToolchain(conanfile)
251251
assert tc.configure_args["--foo"] is None
252252
assert tc.configure_args["--bar"] is None
253253

254-
conanfile.conf.define("tools.gnu:extra_configure_args", "--foo --bar")
254+
conanfile.conf.define("tools.gnu:configure_args", "--foo --bar")
255255
with pytest.raises(ConanException) as expected:
256256
GnuToolchain(conanfile)
257-
assert "[conf] tools.gnu:extra_configure_args must be a list-like object. " \
257+
assert "[conf] tools.gnu:configure_args must be a list-like object. " \
258258
"The value '--foo --bar' introduced is a str object" in str(expected)

0 commit comments

Comments
 (0)