def resolve_dep(self, depname):
        """ Locate dep in the search path; if found, return its path.
        If not found in the search path, and the dep is not a system-provided
        dep, raise an error """
        for d in self._search_path:
            name = os.path.join(d, depname)
            if self._mock:
                return name
            if os.path.exists(name):
                return name
        if self.resolve_dep_from_path(depname):
            # It's a system dep, so skip it
            return None

        message = "unable to find %s in %r" % (depname, self._search_path + self._path)
        print(message)
        # The conditional is to ease future debugging
        if True:
            raise RuntimeError(message)
        return None
Locate dep in the search path; if found, return its path.
        If not found in the search path, and the dep is not a system-provided
        dep, raise an error