aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--authors.txt1
-rwxr-xr-xmeson.py14
2 files changed, 11 insertions, 4 deletions
diff --git a/authors.txt b/authors.txt
index fbac571..f0c2006 100644
--- a/authors.txt
+++ b/authors.txt
@@ -45,3 +45,4 @@ Elliott Sales de Andrade
Patrick Griffis
Iain Lane
Daniel Brendle
+Franz Zapata
diff --git a/meson.py b/meson.py
index b977368..fbca883 100755
--- a/meson.py
+++ b/meson.py
@@ -17,8 +17,14 @@
from mesonbuild import mesonmain
import sys, os
-thisfile = __file__
-if not os.path.isabs(thisfile):
- thisfile = os.path.normpath(os.path.join(os.getcwd(), thisfile))
+def main():
+ thisfile = __file__
+ if not os.path.isabs(thisfile):
+ thisfile = os.path.normpath(os.path.join(os.getcwd(), thisfile))
+ if __package__ == '':
+ thisfile = os.path.dirname(thisfile)
-sys.exit(mesonmain.run(thisfile, sys.argv[1:]))
+ sys.exit(mesonmain.run(thisfile, sys.argv[1:]))
+
+if __name__ == '__main__':
+ main()