MCPcopy Create free account
hub / github.com/numpy/numpy / is_local_src_dir

Function is_local_src_dir

numpy/distutils/misc_util.py:598–611  ·  view source on GitHub ↗

Return true if directory is local directory.

(directory)

Source from the content-addressed store, hash-verified

596 return _get_headers(_get_directories(sources))
597
598def is_local_src_dir(directory):
599 """Return true if directory is local directory.
600 """
601 if not is_string(directory):
602 return False
603 abs_dir = os.path.abspath(directory)
604 c = os.path.commonprefix([os.getcwd(), abs_dir])
605 new_dir = abs_dir[len(c):].split(os.sep)
606 if new_dir and not new_dir[0]:
607 new_dir = new_dir[1:]
608 if new_dir and new_dir[0]=='build':
609 return False
610 new_dir = os.sep.join(new_dir)
611 return os.path.isdir(new_dir)
612
613def general_source_files(top_path):
614 pruned_directories = {'CVS':1, '.svn':1, 'build':1}

Callers 3

get_ext_source_filesFunction · 0.85
get_lib_source_filesFunction · 0.85
get_data_filesFunction · 0.85

Calls 4

is_stringFunction · 0.85
abspathMethod · 0.45
splitMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected