Package conary :: Package build :: Module build :: Class IncludeLicense
[hide private]
[frames] | no frames]

Class IncludeLicense

source code

  action.Action --+        
                  |        
action.RecipeAction --+    
                      |    
            BuildAction --+
                          |
                         IncludeLicense

NAME

r.IncludeLicense() - Adds entries to the licenses conary understands

SYNOPSIS

r.IncludeLicense(directory || (file, license))

DESCRIPTION

The r.IncludeLicense() class is called from within a Conary recipe to add a new license to the list of known licenses.

EXAMPLES

r.IncludeLicense(('gpl.txt', 'GPL-2'), ('cpl', 'CPL-1.0'))

Calls r.IncludeLicense() to add the GPL and CPL licenses to the known licenses.

C {r.IncludeLicense('licensedir')}

Calls r.IncludeLicense() to add a directory of licenses to the known licences. The format for this directory is the same format as %(datadir)s/known-licenses. Note that all sha1sum values will be recalculated after normalization of the license text, so the filename inside the license directory is irrelevent.

Instance Methods [hide private]
 
__init__(self, recipe, *args, **keywords) source code
 
sha1sum(self, text) source code
 
normalize(self, text) source code
 
writeLicenses(self, text, license) source code
 
walkLicenses(self, dir, write=False) source code
 
do(self, macros)
Do the build action
source code

Inherited from BuildAction: doAction, initManifest, missingFiles

Inherited from action.RecipeAction: doPrep, doSuggestAutoBuildReqs, init_error

Inherited from action.Action: addArgs

Inherited from action.Action (private): _applyDefaults

Class Variables [hide private]

Inherited from BuildAction: keywords, useExplicitManifest

Method Details [hide private]

__init__(self, recipe, *args, **keywords)
(Constructor)

source code 
Overrides: BuildAction.__init__
(inherited documentation)

do(self, macros)

source code 
Do the build action
Overrides: BuildAction.do
(inherited documentation)