Esempio n. 1
0
 def test_render(self):
     self.fs.CreateFile('needs.json',
                        contents=textwrap.dedent('''\
         libraries:
             mylib:
                 {% set bar = 'bar' -%}
                 directory: {{bar}}
     '''))
     needy = Needy(needy_configuration=NeedyConfiguration(None))
     self.assertEqual(
         needy.render().strip(),
         textwrap.dedent('''\
         libraries:
             mylib:
                 directory: bar
     ''').strip())
Esempio n. 2
0
 def test_libraries_to_build(self):
     self.fs.CreateFile('needs.json',
                        contents=json.dumps({
                            'libraries': {
                                'excluded': {},
                                'dependant': {
                                    'dependencies': 'dependency'
                                },
                                'dependency': {}
                            }
                        }))
     needy = Needy(needy_configuration=NeedyConfiguration(None))
     libraries = needy.libraries_to_build(needy.target('host'),
                                          ['dependant'])
     self.assertEqual(len(libraries), 2)
     self.assertEqual(libraries[0][0], 'dependency')
     self.assertEqual(libraries[1][0], 'dependant')
Esempio n. 3
0
 def pkg_config_path(self):
     needy = Needy(self.path())
     return needy.pkg_config_path(Target(host_platform()()))
Esempio n. 4
0
 def needs_directory(self):
     needy = Needy(self.path())
     return needy.needs_directory()
Esempio n. 5
0
 def source_directory(self, library, target=Target(host_platform()())):
     needy = Needy(self.path())
     return needy.source_directory(library)
Esempio n. 6
0
 def build_directory(self,
                     library,
                     target_or_universal_binary=Target(host_platform()())):
     needy = Needy(self.path())
     return needy.build_directory(library, target_or_universal_binary)