diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py index eeeb8d1fedc1..f6eb659896e9 100644 --- a/mesonbuild/coredata.py +++ b/mesonbuild/coredata.py @@ -923,7 +923,7 @@ def update_project_options(self, options: 'MutableKeyedOptionDictType', subproje fatal=False) # Find any extranious keys for this project and remove them - for key in list(self.options.keys() - options.keys()): + for key in self.options.keys() - options.keys(): if key.is_project() and key.subproject == subproject: del self.options[key] diff --git a/mesonbuild/utils/universal.py b/mesonbuild/utils/universal.py index edb309f0d000..ce9afd96be27 100644 --- a/mesonbuild/utils/universal.py +++ b/mesonbuild/utils/universal.py @@ -168,8 +168,11 @@ class _VerPickleLoadable(Protocol): from glob import glob -if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'): - # using a PyInstaller bundle, e.g. the MSI installed executable +if getattr(sys, 'frozen', False): + # Using e.g. a PyInstaller bundle, such as the MSI installed executable. + # It is conventional for freeze programs to set this attribute to indicate + # that the program is self hosted, and for example there is no associated + # "python" executable. python_command = [sys.executable, 'runpython'] else: python_command = [sys.executable] @@ -1587,7 +1590,7 @@ def Popen_safe_logged(args: T.List[str], msg: str = 'Called', **kwargs: T.Any) - mlog.debug(f'{msg}: `{join_args(args)}` -> {excp}') raise - rc, out, err = p.returncode, o.strip(), e.strip() + rc, out, err = p.returncode, o.strip() if o else None, e.strip() if e else None mlog.debug('-----------') mlog.debug(f'{msg}: `{join_args(args)}` -> {rc}') if out: diff --git a/test cases/rust/12 bindgen/meson.build b/test cases/rust/12 bindgen/meson.build index f31040ec7808..09cb02a6d319 100644 --- a/test cases/rust/12 bindgen/meson.build +++ b/test cases/rust/12 bindgen/meson.build @@ -105,9 +105,9 @@ if prog_bindgen.version().version_compare('>= 0.65') input : 'src/header3.h', output : 'header3.rs', output_inline_wrapper : 'header3.c', - include_directories : 'include', + include_directories : inc, ) - c_inline_wrapper = static_library('c_wrapper', gen3[1]) + c_inline_wrapper = static_library('c_wrapper', gen3[1], include_directories: inc) f = configure_file( input : 'src/main3.rs',