aboutsummaryrefslogtreecommitdiff
path: root/meson.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2016-10-02 15:28:06 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2016-10-02 09:35:02 -0400
commitc69c15ee16262908c7653a8de0436ce4463df6dd (patch)
tree4093b03b69bafc9d4d2d7464b7b71d42bf70f042 /meson.py
parent6ec1e990430a1958a35401a2b2e82e28edeb3b48 (diff)
downloadmeson-c69c15ee16262908c7653a8de0436ce4463df6dd.zip
meson-c69c15ee16262908c7653a8de0436ce4463df6dd.tar.gz
meson-c69c15ee16262908c7653a8de0436ce4463df6dd.tar.bz2
Revert #823, see also #830.
Diffstat (limited to 'meson.py')
-rwxr-xr-xmeson.py23
1 files changed, 8 insertions, 15 deletions
diff --git a/meson.py b/meson.py
index bc448ad..7e21c78 100755
--- a/meson.py
+++ b/meson.py
@@ -17,18 +17,11 @@
from mesonbuild import mesonmain
import sys, os
-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)
-
- # The first argument *must* be an absolute path because
- # the user may have launched the program from a dir
- # that is not in path.
- sys.exit(mesonmain.run(thisfile, sys.argv[1:]))
-
-if __name__ == '__main__':
- main()
-
+thisfile = __file__
+if not os.path.isabs(thisfile):
+ thisfile = os.path.normpath(os.path.join(os.getcwd(), thisfile))
+
+# The first argument *must* be an absolute path because
+# the user may have launched the program from a dir
+# that is not in path.
+sys.exit(mesonmain.run(thisfile, sys.argv[1:]))