summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMads Andreasen <github@andreasen.cc>2024-07-21 15:28:33 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2024-07-21 21:45:21 +0300
commitd587fb587d2d32963a7b5f6dfe45895a5e1e6076 (patch)
tree53a430bff9497b5543017b8079d41131891e4cdc
parent96f20d5b372b9982c153b114eb3726fbbecb7542 (diff)
downloadmeson-d587fb587d2d32963a7b5f6dfe45895a5e1e6076.tar.gz
Remove the exe_exists function
This function is no longer used since shutil.which() is used instead.
-rw-r--r--mesonbuild/utils/universal.py3
-rw-r--r--unittests/internaltests.py4
2 files changed, 0 insertions, 7 deletions
diff --git a/mesonbuild/utils/universal.py b/mesonbuild/utils/universal.py
index b5310b8c3..574bcb51f 100644
--- a/mesonbuild/utils/universal.py
+++ b/mesonbuild/utils/universal.py
@@ -680,9 +680,6 @@ def is_qnx() -> bool:
def is_aix() -> bool:
return platform.system().lower() == 'aix'
-def exe_exists(exe: str) -> bool:
- return shutil.which(exe) is not None
-
@lru_cache(maxsize=None)
def darwin_get_object_archs(objpath: str) -> 'ImmutableListProtocol[str]':
'''
diff --git a/unittests/internaltests.py b/unittests/internaltests.py
index ada6602ee..fa0e440d3 100644
--- a/unittests/internaltests.py
+++ b/unittests/internaltests.py
@@ -814,10 +814,6 @@ class InternalTests(unittest.TestCase):
self.assertTrue(vctools_ver.startswith(toolset_ver),
msg=f'{vctools_ver!r} does not start with {toolset_ver!r}')
- def test_exe_exists(self):
- self.assertTrue(utils.universal.exe_exists('python3'))
- self.assertFalse(utils.universal.exe_exists('command_that_does_not_exist'))
-
def test_split_args(self):
split_args = mesonbuild.mesonlib.split_args
join_args = mesonbuild.mesonlib.join_args