.. currentmodule:: pyke .. _large-projects: Including build files and importing rules =========================================== .. _including-build-files: Including build files ----------------------------------------------- :func:`include` is a convenient function to help you structure your builds. As you might expect, you can include as many build files as you want. Once you include a build file, it will be parsed and all the rules will be executed, that means that some jobs will be scheduled and global variables will be available for other build files included thereafter (included files are processed in the order in which they are included). As an example, if your project has two libraries "core" and "ui" that need to be built before you try to link your "beautifulapp", then you need to include "core" and "ui" before "beautifulapp". Simple, right? .. code-block::python include ( 'core', 'ui', 'beautifulapp' ) .. autofunction:: include ([path [, path_2 ... [, path_n]], export_locals = None) .. _importing-rules: Importing rules ----------------------------------------------- It is very handy to import rules from other pyke/python files. The difference between :func:`pyke.importRules` and :func:`pyke.include` is that :func:`pyke.importRules` executes the python file as if it was inlined in the current file, importing all the variables, functions and classes in the current namespace, whereas :func:`pyke.include` does not import variables into the namespace. .. autofunction:: pyke.importRules