From c69c15ee16262908c7653a8de0436ce4463df6dd Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sun, 2 Oct 2016 15:28:06 +0300 Subject: Revert #823, see also #830. --- meson.py | 23 ++++++++--------------- 1 file 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:])) -- cgit v1.1