Package gbp :: Package rpm
[hide private]
[frames] | no frames]

Package rpm

provides some rpm source package related helpers

Submodules [hide private]

Classes [hide private]
  NoSpecError
no changelog found
  MacroExpandError
  RpmUpstreamSource
Upstream source class for Debian
  SrcRpmFile
Keeps all needed data read from a source rpm
  SpecFile
Class for parsing/modifying spec files
Functions [hide private]
 
parse_srpm(srpmfile)
parse srpm by creating a SrcRpmFile object
 
parse_spec(specfile)
 
guess_spec(topdir, recursive=True, preferred_name=None)
Guess a spec file
 
guess_spec_repo(repo, branch, packaging_dir)
int
>>> string_to_int("1234")
1234
>>> string_to_int("123k")
125952
>>> string_to_int("1234K")
1263616
>>> string_to_int("1M")
1048576
string_to_int(val_str)
Convert string of possible unit identifier to int.
Variables [hide private]
  MAX_SOURCE_NUMBER = 99999
  __package__ = 'gbp.rpm'
Function Details [hide private]

guess_spec_repo(repo, branch, packaging_dir)

 

To Do: implement this Try to find/parse the spec file from given branch in the git repository.

string_to_int(val_str)

 

Convert string of possible unit identifier to int.

Parameters:
  • val_str (str) - value to be converted
Returns: int
>>> string_to_int("1234")
1234
>>> string_to_int("123k")
125952
>>> string_to_int("1234K")
1263616
>>> string_to_int("1M")
1048576
value as integer