Support for GLib2 tools:
Task generator method
Add a file to the list of marshal files to process. Store them in the attribute marshal_list.
Parameters: |
|
---|
Process the marshal files stored in the attribute marshal_list to create waflib.Tools.glib2.glib_genmarshal instances. Add the c file created to the list of source to process.
Task generator method
Add a file to the list of enum files to process. Store them in the attribute enums_list.
Parameters: |
|
---|
Task generator method
Add a file to the list of enum files to process. Store them in the attribute enums_list.
Parameters: |
|
---|
Process the enum files stored in the attribute enum_list to create waflib.Tools.glib2.glib_mkenums instances.
Bases: waflib.Task.Task
Process enum files
Task generator method
Add settings files to process, add them to settings_schema_files
Parameters: | filename_list (list of string) – files |
---|
Task generator method
This function may be called only once by task generator to set the enums namespace.
Parameters: |
|
---|
Task generator method
Process the schema files in settings_schema_files to create waflib.Tools.glib2.glib_mkenums instances. The same files are validated through waflib.Tools.glib2.glib_validate_schema tasks.
Feature: | glib2 |
---|
Bases: waflib.Task.Task
Validate schema files
Hook to process .gresource.xml to generate C source files
Task generator method
Generate a binary .gresource files from .gresource.xml files:
def build(bld):
bld(
features='gresource',
source=['resources1.gresource.xml', 'resources2.gresource.xml'],
install_path='${LIBDIR}/${PACKAGE}'
)
Parameters: |
|
---|---|
Feature: |
Bases: waflib.Task.Task
Base class for gresource based tasks, it implements the implicit dependencies scan.
Scan gresource dependencies through glib-compile-resources --generate-dependencies command
Bases: waflib.Tools.glib2.glib_gresource_base
Task to generate C source code (.h and .c files) from a gresource.xml file
Bases: waflib.Tools.glib2.glib_gresource_base
Task to generate a .gresource binary file from a gresource.xml file
Configuration Method bound to waflib.Configure.ConfigurationContext
Configuration Method bound to waflib.Configure.ConfigurationContext
Configuration Method bound to waflib.Configure.ConfigurationContext
Configuration Method bound to waflib.Configure.ConfigurationContext
Find the following programs:
And set the variable GSETTINGSSCHEMADIR
Decorator: attach new configuration functions to waflib.Build.BuildContext and waflib.Configure.ConfigurationContext. The methods bound will accept a parameter named ‘mandatory’ to disable the configuration errors:
def configure(conf):
conf.find_program('abc', mandatory=False)
Parameters: | f (function) – method to bind |
---|
Decorator: register a method as a task generator method. The function must accept a task generator as first parameter:
from waflib.TaskGen import taskgen_method
@taskgen_method
def mymethod(self):
pass
Parameters: | func (function) – task generator method to add |
---|---|
Return type: | function |
Decorator: register a task generator method that will be executed when the object attribute ‘feature’ contains the corresponding key(s):
from waflib.Task import feature
@feature('myfeature')
def myfunction(self):
print('that is my feature!')
def build(bld):
bld(features='myfeature')
Parameters: | k (list of string) – feature names |
---|
Decorator: register a task generator method which will be executed before the functions of given name(s):
from waflib.TaskGen import feature, before
@feature('myfeature')
@before_method('fun2')
def fun1(self):
print('feature 1!')
@feature('myfeature')
def fun2(self):
print('feature 2!')
def build(bld):
bld(features='myfeature')
Parameters: | k (list of string) – method names |
---|
Decorator: register a task generator method which will be invoked during the processing of source files for the extension given:
from waflib import Task
class mytask(Task):
run_str = 'cp ${SRC} ${TGT}'
@extension('.moo')
def create_maa_file(self, node):
self.create_task('mytask', node, node.change_ext('.maa'))
def build(bld):
bld(source='foo.moo')
Features defined in this module: