Contents of debian/source/format

>>> d = DebianSourceFormat("3.0 (quilt)")
>>> d.type
'quilt'
>>> d.version
'3.0'
>>> d = DebianSourceFormat("3.0 (native)")
>>> d.type
'native'
>>> d = DebianSourceFormat("1.0")
>>> d.type
>>> d.version
'1.0'
>>> d = DebianSourceFormat("1.0 broken")
Traceback (most recent call last):
...
gbp.deb.format.DebianSourceFormatError: Cannot get source format from '1.0 broken'
Method __init__ Undocumented
Method version The source format version number
Method type The 'type' (e.g. git, native)
Method __str__ Undocumented
Class Method parse_file Parse debian/source/format file
Class Method from_content Write a format file from I{type} and I{format} at I{format_file}
Method _parse Undocumented
def _parse(self, content):
Undocumented
def __init__(self, content):
Undocumented
@property
def version(self):
The source format version number
@property
def type(self):
The 'type' (e.g. git, native)
def __str__(self):
Undocumented
@classmethod
def parse_file(cls, filename):
Parse debian/source/format file

@param filename: the file to parse
@type filename: C{str}
@returns: a debisn/source/format object
@rtype: L{DebianSourceFormat}

>>> import tempfile, os
>>> with tempfile.NamedTemporaryFile(delete=False) as t:
...    ret = t.write(b"3.0 (quilt)")
>>> d = DebianSourceFormat.parse_file(t.name)
>>> d.version
'3.0'
>>> d.type
'quilt'
>>> os.unlink(t.name)
@classmethod
def from_content(cls, version, type, format_file=None):
Write a format file from I{type} and I{format} at
I{format_file}

@param version: the source package format version
@param type: the format type
@param format_file: the format file to create with
    the above parameters
API Documentation for git-buildpackage, generated by pydoctor at 2019-11-14 12:49:35.