Beispiel #1
0
def _pop_values(values_dct, key):
    """Remove values from the dictionary and convert them as a list"""
    vals_str = values_dct.pop(key, '')
    if not vals_str:
        return
    fields = []
    # the line separator is \n for setup.cfg files
    for field in vals_str.split('\n'):
        tmp_vals = field.split('--')
        if len(tmp_vals) == 2 and not interpret(tmp_vals[1]):
            continue
        fields.append(tmp_vals[0])
    # Get bash options like `gcc -print-file-name=libgcc.a` XXX bash options?
    vals = split(' '.join(fields))
    if vals:
        return vals
Beispiel #2
0
 def _platform(self, value):
     if not self.platform_dependent or ';' not in value:
         return True, value
     value, marker = value.split(';')
     return interpret(marker, self.execution_context), value