Closed worldofpeace closed 4 years ago
I will be rebasing this, is there any possibility of a merge or even review here? It's been months here.
Hi, looks fine, sorry about the delay. A couple of concerns:
Why fallback to 'python' in find_program? Something to do with NixOS as well? I wonder if on some distros that might find python2 instead. We were installing to python2 and python3 deliberately but I'm not sure it's necessary any more, I don't think anything we have uses python2 (and I think this was only for glade support, though I can't remember).
The code in question here is
exec = find_program(['python3', 'python'])`
for ref.
And there's nothing NixOS specific at hand here, it was the only fallback I could think of and it still could be python2
. Though I know at least in archlinux it's for sure python3
.
The only thing that's NixOS specific is that we need py-overrides-dir
, but that option being present in most projects it pretty prevalent now since I've upstreamed many similar patches to projects with overrides.
there is the chance to have an empty override_dir, that would just break our build, which is fine, I just wasn't sure if it was deliberate or not.
You mean import gi;print(gi._overridesdir)
returns ""
but the return code is non zero?
In that case I could assert the string isn't empty.
This PR adjusts the
meson.build
expressions to be more well aligned with its purpose.Adds an option that allows us to specify the pygobject override directory. This is mostly an issue for NixOS where packages are installed into their own immutable prefix and
gi._overridesdir
is going to return a path we cannot write to. So it's a good practice to have this option to maintain portability with other platforms.This should always be done with meson.