@property
    def candidate_version(self):
        if not hasattr(self, '_candidate_version'):
            proc = Popen([self.easy_install_binary_path, "-n", self.resource.package_name], stdout=PIPE, stderr=STDOUT)
            out = proc.communicate()[0]
            res = proc.wait()
            if res != 0:
                self.log.warning("easy_install check returned a non-zero result (%d) %s" % (res, self.resource))
            #     self._candidate_version = None
            # else:
            match = BEST_MATCH_RE.search(out)
            if not match:
                self._candidate_version = None
            else:
                self._candidate_version = match.group(2)
        return self._candidate_version
dataset/ETHPy150Open samuel/kokki/kokki/providers/package/easy_install.py/EasyInstallProvider.candidate_version/original