diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2016-10-02 15:28:06 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2016-10-02 09:35:02 -0400 |
commit | c69c15ee16262908c7653a8de0436ce4463df6dd (patch) | |
tree | 4093b03b69bafc9d4d2d7464b7b71d42bf70f042 /meson.py | |
parent | 6ec1e990430a1958a35401a2b2e82e28edeb3b48 (diff) | |
download | meson-c69c15ee16262908c7653a8de0436ce4463df6dd.zip meson-c69c15ee16262908c7653a8de0436ce4463df6dd.tar.gz meson-c69c15ee16262908c7653a8de0436ce4463df6dd.tar.bz2 |
Revert #823, see also #830.
Diffstat (limited to 'meson.py')
-rwxr-xr-x | meson.py | 23 |
1 files changed, 8 insertions, 15 deletions
@@ -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:])) |