Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def find_cmake(p, start):
if p and not os.path.isabs(p):
absp = util.actual_path(p, start)
if os.path.exists(absp): return absp
else:
x = util.cget_dir('cmake', p)
if os.path.exists(x): return x
elif os.path.exists(x + '.cmake'): return x + '.cmake'
return p
def parse_src_file(self, name, url, start=None):
f = util.actual_path(url, start)
self.log('parse_src_file actual_path:', start, f)
if os.path.exists(f): return PackageSource(name=name, url='file://' + f)
return None