Beispiel #1
0
 def generate():
     overreport = True
     for input in source:
         extension = splitext(input.name)[1]
         if extension == '.json':
             overreport = False
             yield '-iiglue-read-file'
             yield input
         elif extension == '.so':
             yield '-load'
             yield './%s' % input
         else:
             yield input
     if overreport:
         yield '-overreport'
Beispiel #2
0
 def generate():
     suffix = env.subst(builder.builder.suffix)
     for src in imap(File, source):
         obj = objdir.File(splitext(src.name)[0] + suffix)
         builder(obj, src)
         yield obj
Beispiel #3
0
 def test_splitext(self):
     assert splitext('foo') == ('foo', '')
     assert splitext('foo.bar') == ('foo', '.bar')
     assert splitext(os.path.join('foo.bar', 'blat')) == (os.path.join(
         'foo.bar', 'blat'), '')