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

Method _wildcard_get_subpackage

numpy/distutils/misc_util.py:914–931  ·  view source on GitHub ↗
(self, subpackage_name,
                                 parent_name,
                                 caller_level = 1)

Source from the content-addressed store, hash-verified

912 return get_distribution()
913
914 def _wildcard_get_subpackage(self, subpackage_name,
915 parent_name,
916 caller_level = 1):
917 l = subpackage_name.split('.')
918 subpackage_path = njoin([self.local_path]+l)
919 dirs = [_m for _m in sorted_glob(subpackage_path) if os.path.isdir(_m)]
920 config_list = []
921 for d in dirs:
922 if not os.path.isfile(njoin(d, '__init__.py')):
923 continue
924 if 'build' in d.split(os.sep):
925 continue
926 n = '.'.join(d.split(os.sep)[-len(l):])
927 c = self.get_subpackage(n,
928 parent_name = parent_name,
929 caller_level = caller_level+1)
930 config_list.extend(c)
931 return config_list
932
933 def _get_configuration_from_setup_py(self, setup_py,
934 subpackage_name,

Callers 1

get_subpackageMethod · 0.95

Calls 5

get_subpackageMethod · 0.95
njoinFunction · 0.85
sorted_globFunction · 0.85
splitMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected