def testFill(self):
     xcconfig = XCConfig('gstreamer-0.10')
     expected = \
         {'libs': ' -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 '
                  '-lxml2 -lgthread-2.0 -lrt -lglib-2.0',
          'hsp': '/usr/include/gstreamer-0.10 /usr/include/glib-2.0 '
                 '/usr/lib/glib-2.0/include '
                 '/usr/include/libxml2',
          'lsp': ''}
     self.assertEqual(expected, xcconfig._fill())
Exemplo n.º 2
0
    def runargs(self, config, output_dir, filename, libraries):
        if not os.path.exists(output_dir):
            os.makedirs(output_dir)

        if len(libraries) == 0:
            raise UsageError("You need to specify at least one library name")

        filename = filename or libraries[0]
        filepath = os.path.join(output_dir, '%s.xcconfig' % filename)

        xcconfig = XCConfig(libraries)
        xcconfig.create(filepath)
        m.action('Created %s.xcconfig' % filename)

        m.message('XCode config file were sucessfully created in %s' %
                  os.path.abspath(filepath))
Exemplo n.º 3
0
    def runargs(self, config, output_dir, filename, libraries):
        if not os.path.exists(output_dir):
            os.makedirs(output_dir)

        if len(libraries) == 0:
            raise UsageError("You need to specify at least one library name")

        filename = filename or libraries[0]
        filepath = os.path.join(output_dir, '%s.xcconfig' % filename)

        xcconfig = XCConfig(libraries)
        xcconfig.create(filepath)
        m.action('Created %s.xcconfig' % filename)

        m.message('XCode config file were sucessfully created in %s' %
                  os.path.abspath(filepath))
 def testXCConfig(self):
     tmp = tempfile.NamedTemporaryFile()
     xcconfig = XCConfig('gstreamer-0.10')
     xcconfig.create(tmp.name)
     with open(tmp.name, 'r') as f:
         self.assertEqual(f.read(), XCCONFIG)