aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mesonlib.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/mesonlib.py')
-rw-r--r--mesonbuild/mesonlib.py24
1 files changed, 11 insertions, 13 deletions
diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py
index f649738..cf43131 100644
--- a/mesonbuild/mesonlib.py
+++ b/mesonbuild/mesonlib.py
@@ -65,6 +65,17 @@ else:
python_command = [sys.executable]
meson_command = None
+class MesonException(Exception):
+ '''Exceptions thrown by Meson'''
+
+ file = None # type: T.Optional[str]
+ lineno = None # type: T.Optional[int]
+ colno = None # type: T.Optional[int]
+
+
+class EnvironmentException(MesonException):
+ '''Exceptions thrown while processing and creating the build environment'''
+
GIT = shutil.which('git')
def git(cmd: T.List[str], workingdir: str, **kwargs: T.Any) -> subprocess.CompletedProcess:
pc = subprocess.run([GIT, '-C', workingdir] + cmd,
@@ -132,19 +143,6 @@ def check_direntry_issues(direntry_array: T.Union[T.List[T.Union[str, bytes]], s
import threading
an_unpicklable_object = threading.Lock()
-
-class MesonException(Exception):
- '''Exceptions thrown by Meson'''
-
- file = None # type: T.Optional[str]
- lineno = None # type: T.Optional[int]
- colno = None # type: T.Optional[int]
-
-
-class EnvironmentException(MesonException):
- '''Exceptions thrown while processing and creating the build environment'''
-
-
class FileMode:
# The first triad is for owner permissions, the second for group permissions,
# and the third for others (everyone else).