parameters: (self)
return_statement: return str(corenum)
docstring: Return pre-release verison suffix.
docstring_summary: Return pre-release verison suffix.
docstring_tokens: Return pre - release verison suffix .
function: def prelease(self):
          """Return pre-release verison suffix."""
          # NOTE: This is only called for RPM packages, and only after
          # pversion() below has been called. If you want to change this format
          # and want DEB packages to match, make sure to update pversion()
          # below
          #
          # "N" is either passed in on the command line, or "1"
          if self.rel:
              corenum = self.rel
          else:
              corenum = 1
  
          # Version suffix for RPM packages:
          # 1) RC's - "0.N.rcX"
          # 2) Nightly (snapshot) - "0.N.latest"
          # 3) Patch builds - "0.N.patch.<patch_id>"
          # 4) Standard release - "N"
          if self.is_rc():
              return "0.%s.%s" % (corenum, re.sub('.*-', '', self.version()))
          elif self.is_nightly():
              return "0.%s.latest" % (corenum)
          elif self.is_patch():
              return "0.%s.patch.%s" % (corenum, self.patch_id())
          return str(corenum)
function_tokens: def prelease ( self ) : # NOTE: This is only called for RPM packages, and only after # pversion() below has been called. If you want to change this format # and want DEB packages to match, make sure to update pversion() # below # # "N" is either passed in on the command line, or "1" if self . rel : corenum = self . rel else : corenum = 1 # Version suffix for RPM packages: # 1) RC's - "0.N.rcX" # 2) Nightly (snapshot) - "0.N.latest" # 3) Patch builds - "0.N.patch.<patch_id>" # 4) Standard release - "N" if self . is_rc ( ) : return "0.%s.%s" % ( corenum , re . sub ( '.*-' , '' , self . version ( ) ) ) elif self . is_nightly ( ) : return "0.%s.latest" % ( corenum ) elif self . is_patch ( ) : return "0.%s.patch.%s" % ( corenum , self . patch_id ( ) ) return str ( corenum )