parameters: (self, filename=None, **kwargs)
docstring: :param filename: location of package.xml.  Necessary if
            converting ``${prefix}`` in ``<export>`` values, ``str``.
docstring_summary: :param filename: location of package.xml.  Necessary if
            converting ``${prefix}`` in ``<export>`` values, ``str``.
docstring_tokens: : param filename : location of package . xml . Necessary if converting $ { prefix } in <export > values str .
function: def __init__(self, filename=None, **kwargs):
          """
          :param filename: location of package.xml.  Necessary if
            converting ``${prefix}`` in ``<export>`` values, ``str``.
          """
          # initialize all slots ending with "s" with lists, all other with plain values
          for attr in self.__slots__:
              if attr.endswith('s'):
                  value = list(kwargs[attr]) if attr in kwargs else []
                  setattr(self, attr, value)
              else:
                  value = kwargs[attr] if attr in kwargs else None
                  setattr(self, attr, value)
          if 'depends' in kwargs:
              for d in kwargs['depends']:
                  for slot in [self.build_depends, self.build_export_depends, self.exec_depends]:
                      if d not in slot:
                          slot.append(deepcopy(d))
              del kwargs['depends']
          if 'run_depends' in kwargs:
              for d in kwargs['run_depends']:
                  for slot in [self.build_export_depends, self.exec_depends]:
                      if d not in slot:
                          slot.append(deepcopy(d))
              del kwargs['run_depends']
          self.filename = filename
          # verify that no unknown keywords are passed
          unknown = set(kwargs.keys()).difference(self.__slots__)
          if unknown:
              raise TypeError('Unknown properties: %s' % ', '.join(unknown))
function_tokens: def __init__ ( self , filename = None , * * kwargs ) : # initialize all slots ending with "s" with lists, all other with plain values for attr in self . __slots__ : if attr . endswith ( 's' ) : value = list ( kwargs [ attr ] ) if attr in kwargs else [ ] setattr ( self , attr , value ) else : value = kwargs [ attr ] if attr in kwargs else None setattr ( self , attr , value ) if 'depends' in kwargs : for d in kwargs [ 'depends' ] : for slot in [ self . build_depends , self . build_export_depends , self . exec_depends ] : if d not in slot : slot . append ( deepcopy ( d ) ) del kwargs [ 'depends' ] if 'run_depends' in kwargs : for d in kwargs [ 'run_depends' ] : for slot in [ self . build_export_depends , self . exec_depends ] : if d not in slot : slot . append ( deepcopy ( d ) ) del kwargs [ 'run_depends' ] self . filename = filename # verify that no unknown keywords are passed unknown = set ( kwargs . keys ( ) ) . difference ( self . __slots__ ) if unknown : raise TypeError ( 'Unknown properties: %s' % ', ' . join ( unknown ) )