[chirp_devel] [PATCH] Try harder to find resources. #4487

Dan Smith
Mon Feb 6 12:03:47 PST 2017


>> +    def find_resource(self, filename):
>> +        """Searches for files installed to a share/ prefix."""
>> +        execpath = self.executable_path()
>> +        share_candidates = [
>> +            os.path.join(execpath, "share"),
>> +            os.path.join(sys.prefix, "share"),
>> +            "/usr/local/share",
>> +            "/usr/share",
>> +        ]
> 
> I'd have to go check, but I think that some of the stuff ends up
> flattened in the windows build (for better or worse).
> 
> Any reason you can't just leave execpath in the list so we don't need to
> argue? (i.e. compatibility with what is there now just in case).

I snipped too early:

> +        pkgshare_candidates = [os.path.join(i, "chirp") for i in share_candidates]
> +        search_paths = [execpath] + pkgshare_candidates + share_candidates

execpath is in there ^.

So, uh, nevermind, applied. Thanks!

--Dan



More information about the chirp_devel mailing list