New properties for easily getting the archive format (tar, zip, ...) and
compression format (gzip, bzip2, ...) of the sources.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Conflicts:
gbp/pkg/__init__.py
@property
def archive_fmt(self):
"""Archive format of the sources, e.g. 'tar'"""
+ """
+ >>> UpstreamSource('foo/bar.tar.gz').archive_fmt
+ 'tar'
+ >>> UpstreamSource('foo.bar.zip').archive_fmt
+ 'zip'
+ >>> UpstreamSource('foo.bar.baz').archive_fmt
+ """
return self._archive_fmt
@property
def compression(self):
"""Compression format of the sources, e.g. 'gzip'"""
+ """
+ >>> UpstreamSource('foo/bar.tar.gz').compression
+ 'gzip'
+ >>> UpstreamSource('foo.bar.zip').compression
+ >>> UpstreamSource('foo.bz2').compression
+ 'bzip2'
+ """
return self._compression
@property