Lines Matching full:path
4 """Small utility function to find depot_tools and add it to the python path.
15 return os.path.isfile(os.path.join(directory, 'gclient.py'))
19 """Search for depot_tools and add it to sys.path."""
21 for i in sys.path:
26 # Then look if depot_tools is in PATH, common case.
27 for i in os.environ['PATH'].split(os.pathsep):
30 sys.path.insert(0, i.rstrip(os.sep))
32 # Rare case, it's not even in PATH, look upward up to root.
33 root_dir = os.path.dirname(os.path.abspath(__file__))
34 previous_dir = os.path.abspath(__file__)
36 if directory_really_is_depot_tools(os.path.join(root_dir, 'depot_tools')):
37 i = os.path.join(root_dir, 'depot_tools')
38 sys.path.insert(0, i)
41 root_dir = os.path.dirname(root_dir)