diff options
| author | Jussi Pakkanen <jpakkane@gmail.com> | 2018-08-08 21:19:20 +0300 |
|---|---|---|
| committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2018-08-09 09:08:33 -0700 |
| commit | 15fb2843955b53414cf292cf0a6b7faf7ffc883a (patch) | |
| tree | e7a4105f847f88e4374ccd07bff6f98d0c6631b6 | |
| parent | 475efb93540546864f1dc44c0d7c54d034386292 (diff) | |
| download | meson-15fb2843955b53414cf292cf0a6b7faf7ffc883a.tar.gz | |
Fix install when run with meson.exe. Closes #3988.
| -rw-r--r-- | mesonbuild/minstall.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py index 248f12ee4..2c007eba6 100644 --- a/mesonbuild/minstall.py +++ b/mesonbuild/minstall.py @@ -20,7 +20,12 @@ from .scripts import depfixer from .scripts import destdir_join from .mesonlib import is_windows, Popen_safe from .mtest import rebuild_all -from __main__ import __file__ as main_file +try: + from __main__ import __file__ as main_file +except ImportError: + # Happens when running as meson.exe which is native Windows. + # This is only used for pkexec which is not, so this is fine. + main_file = None selinux_updates = [] |
