diff options
Diffstat (limited to 'meson.py')
-rwxr-xr-x | meson.py | 19 |
1 files changed, 8 insertions, 11 deletions
@@ -17,14 +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) - - 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:])) |