2 from source_code_file
import SourceCodeFile
9 for rel_fn, file_path
in filenames.iteritems():
10 self.
sources[rel_fn] = SourceCodeFile(rel_fn, file_path)
13 goal_folder = os.path.join(
'include', self.
pkg_name)
15 if goal_folder
in source_fn:
20 return [source
for source
in self.sources.values()
if source.language == language]
23 for tag, files
in [(
'library', cmake.get_library_source()),
24 (
'executable', cmake.get_executable_source()),
25 (
'test', cmake.get_test_source())]:
27 if fn
and fn[0] ==
'$':
32 print(
' File %s found in CMake not found in folder!' % fn)
36 for source
in self.sources.values():
37 if 'test' in source.tags:
39 packages.update(source.get_dependencies())
46 for source
in self.sources.values():
47 if 'test' in source.tags:
49 packages.update(source.get_external_python_dependencies())
54 for source
in self.sources.values():
55 if 'test' not in source.tags:
57 packages.update(source.get_dependencies())
64 for source
in self.sources.values():
66 matches = source.search_lines_for_patterns(patterns)
68 matches = source.search_for_patterns(patterns)
70 files[source.rel_fn] = matches
77 return '\n'.join(map(str, sorted(self.sources.values())))
def get_external_python_dependencies(self)
def has_header_files(self)
def search_for_patterns(self, patterns, per_line=True)
def setup_tags(self, cmake)
def search_for_pattern(self, pattern, per_line=True)
def get_source_by_language(self, language)
def get_build_dependencies(self)
def get_test_dependencies(self)
def __init__(self, filenames, pkg_name)