Public Member Functions | Public Attributes | List of all members
generate-manifest.ManifestBuilder Class Reference

Public Member Functions

def __init__ (self, name, qualifiers)
 
def match_product_qualifiers (self)
 
def build_manifest (self)
 

Public Attributes

 name
 
 qualifiers
 
 df_products
 
 df_qualifiers
 
 manifest
 

Detailed Description

Definition at line 78 of file generate-manifest.py.

Constructor & Destructor Documentation

def generate-manifest.ManifestBuilder.__init__ (   self,
  name,
  qualifiers 
)

Member Function Documentation

def generate-manifest.ManifestBuilder.build_manifest (   self)

Definition at line 101 of file generate-manifest.py.

101  def build_manifest(self):
102  manifest=StringIO()
103  product_qualifiers=self.match_product_qualifiers()
104 
105  for index,product in self.df_products.iterrows():
106  qualifiers='noarch' if product[0] not in product_qualifiers else product_qualifiers[product[0]]
107  product=Product(product,qualifiers)
108  manifest.write(product.manifest_entry())
109 
110  manifest.seek(0)
111 
112  return manifest
113 
114 
def generate-manifest.ManifestBuilder.match_product_qualifiers (   self)

Definition at line 87 of file generate-manifest.py.

88  for index, row in self.df_qualifiers.iterrows():
89  if row[0] == self.qualifiers:
90  return row
91 
92  candidate=row[0].split(':')
93  reference=self.qualifiers.split(':')
94  if len(candidate) != len(reference):
95  continue
96 
97  if set(candidate) == set(reference):
98  return row
99 
100 
void split(std::string const &s, char c, OutIter dest)
Definition: split.h:35

Member Data Documentation

generate-manifest.ManifestBuilder.df_products

Definition at line 82 of file generate-manifest.py.

generate-manifest.ManifestBuilder.df_qualifiers

Definition at line 83 of file generate-manifest.py.

generate-manifest.ManifestBuilder.manifest

Definition at line 84 of file generate-manifest.py.

generate-manifest.ManifestBuilder.name

Definition at line 80 of file generate-manifest.py.

generate-manifest.ManifestBuilder.qualifiers

Definition at line 81 of file generate-manifest.py.


The documentation for this class was generated from the following file: