MCPcopy
hub / github.com/pyinstaller/pyinstaller / path_from

Method path_from

bootloader/waflib/Node.py:289–314  ·  view source on GitHub ↗
(self, node)

Source from the content-addressed store, hash-verified

287 return cur
288
289 def path_from(self, node):
290 c1 = self
291 c2 = node
292 c1h = c1.height()
293 c2h = c2.height()
294 lst = []
295 up = 0
296 while c1h > c2h:
297 lst.append(c1.name)
298 c1 = c1.parent
299 c1h -= 1
300 while c2h > c1h:
301 up += 1
302 c2 = c2.parent
303 c2h -= 1
304 while not c1 is c2:
305 lst.append(c1.name)
306 up += 1
307 c1 = c1.parent
308 c2 = c2.parent
309 if c1.parent:
310 lst.extend(['..'] * up)
311 lst.reverse()
312 return os.sep.join(lst) or '.'
313 else:
314 return self.abspath()
315
316 def abspath(self):
317 try:

Callers 15

bldpathMethod · 0.95
srcpathMethod · 0.95
ant_globMethod · 0.80
archiveMethod · 0.80
add_tar_fileMethod · 0.80
get_exclMethod · 0.80
__str__Method · 0.80
load_envsMethod · 0.80
init_filesMethod · 0.80
runMethod · 0.80
flexfunFunction · 0.80
create_task_macappFunction · 0.80

Calls 4

abspathMethod · 0.95
heightMethod · 0.80
appendMethod · 0.45
extendMethod · 0.45

Tested by 1

make_interpreted_testFunction · 0.64