diff options
author | Aleksey Gurtovoy <agurtovoy@acm.org> | 2019-08-09 16:06:47 -0500 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-09-05 23:42:47 +0300 |
commit | 75daed27bc4e363696157617c7461414fc4e707b (patch) | |
tree | 2863934de82e0a7cc6a3dcd9ee23b4c4e378c550 /mesonbuild/environment.py | |
parent | caec875fe1922b40037e1fd9229433ede64f9f25 (diff) | |
download | meson-75daed27bc4e363696157617c7461414fc4e707b.zip meson-75daed27bc4e363696157617c7461414fc4e707b.tar.gz meson-75daed27bc4e363696157617c7461414fc4e707b.tar.bz2 |
mesonlib.split_args/quote_arg/join_args
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r-- | mesonbuild/environment.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 7e1ca9d..cf386da 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import os, platform, re, sys, shlex, shutil, subprocess, typing +import os, platform, re, sys, shutil, subprocess, typing import tempfile from . import coredata @@ -20,7 +20,7 @@ from .linkers import ArLinker, ArmarLinker, VisualStudioLinker, DLinker, CcrxLin from . import mesonlib from .mesonlib import ( MesonException, EnvironmentException, MachineChoice, Popen_safe, - PerMachineDefaultable, PerThreeMachineDefaultable + PerMachineDefaultable, PerThreeMachineDefaultable, split_args, quote_arg ) from . import mlog @@ -120,7 +120,7 @@ def detect_gcovr(min_version='3.3', new_rootdir_version='4.2', log=False): found = search_version(found) if p.returncode == 0 and mesonlib.version_compare(found, '>=' + min_version): if log: - mlog.log('Found gcovr-{} at {}'.format(found, shlex.quote(shutil.which(gcovr_exe)))) + mlog.log('Found gcovr-{} at {}'.format(found, quote_arg(shutil.which(gcovr_exe)))) return gcovr_exe, mesonlib.version_compare(found, '>=' + new_rootdir_version) return None, None @@ -158,7 +158,7 @@ def detect_ninja(version: str = '1.5', log: bool = False) -> str: name = 'ninja' if name == 'samu': name = 'samurai' - mlog.log('Found {}-{} at {}'.format(name, found, shlex.quote(n))) + mlog.log('Found {}-{} at {}'.format(name, found, quote_arg(n))) return n def detect_native_windows_arch(): @@ -1322,7 +1322,7 @@ class Environment: if isinstance(compiler, compilers.CudaCompiler): linkers = [self.cuda_static_linker, self.default_static_linker] elif evar in os.environ: - linkers = [shlex.split(os.environ[evar])] + linkers = [split_args(os.environ[evar])] elif isinstance(compiler, compilers.VisualStudioLikeCompiler): linkers = [self.vs_static_linker, self.clang_cl_static_linker] elif isinstance(compiler, compilers.GnuCompiler): |