<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Configure — Waf 1.7.11 documentation</title> <link rel="stylesheet" href="_static/default.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '', VERSION: '1.7.11', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> <link rel="author" title="About these documents" href="about.html" /> <link rel="copyright" title="Copyright" href="copyright.html" /> <link rel="top" title="Waf 1.7.11 documentation" href="index.html" /> <link rel="next" title="Context" href="Context.html" /> <link rel="prev" title="ConfigSet" href="ConfigSet.html" /> </head> <body> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="Context.html" title="Context" accesskey="N">next</a> |</li> <li class="right" > <a href="ConfigSet.html" title="ConfigSet" accesskey="P">previous</a> |</li> <li><a href="index.html">Waf 1.7.11 documentation</a> »</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body"> <div class="section" id="module-waflib.Configure"> <span id="configure"></span><h1>Configure<a class="headerlink" href="#module-waflib.Configure" title="Permalink to this headline">¶</a></h1> <p>Configuration system</p> <p>A <a class="reference internal" href="#waflib.Configure.ConfigurationContext" title="waflib.Configure.ConfigurationContext"><tt class="xref py py-class docutils literal"><span class="pre">waflib.Configure.ConfigurationContext</span></tt></a> instance is created when <tt class="docutils literal"><span class="pre">waf</span> <span class="pre">configure</span></tt> is called, it is used to:</p> <ul class="simple"> <li>create data dictionaries (ConfigSet instances)</li> <li>store the list of modules to import</li> <li>hold configuration routines such as <tt class="docutils literal"><span class="pre">find_program</span></tt>, etc</li> </ul> <dl class="data"> <dt id="waflib.Configure.BREAK"> <tt class="descclassname">waflib.Configure.</tt><tt class="descname">BREAK</tt><em class="property"> = 'break'</em><a class="headerlink" href="#waflib.Configure.BREAK" title="Permalink to this definition">¶</a></dt> <dd><p>In case of a configuration error, break</p> </dd></dl> <dl class="data"> <dt id="waflib.Configure.CONTINUE"> <tt class="descclassname">waflib.Configure.</tt><tt class="descname">CONTINUE</tt><em class="property"> = 'continue'</em><a class="headerlink" href="#waflib.Configure.CONTINUE" title="Permalink to this definition">¶</a></dt> <dd><p>In case of a configuration error, continue</p> </dd></dl> <dl class="data"> <dt id="waflib.Configure.WAF_CONFIG_LOG"> <tt class="descclassname">waflib.Configure.</tt><tt class="descname">WAF_CONFIG_LOG</tt><em class="property"> = 'config.log'</em><a class="headerlink" href="#waflib.Configure.WAF_CONFIG_LOG" title="Permalink to this definition">¶</a></dt> <dd><p>Name of the configuration log file</p> </dd></dl> <dl class="data"> <dt id="waflib.Configure.autoconfig"> <tt class="descclassname">waflib.Configure.</tt><tt class="descname">autoconfig</tt><em class="property"> = False</em><a class="headerlink" href="#waflib.Configure.autoconfig" title="Permalink to this definition">¶</a></dt> <dd><p>Execute the configuration automatically</p> </dd></dl> <dl class="function"> <dt id="waflib.Configure.download_check"> <tt class="descclassname">waflib.Configure.</tt><tt class="descname">download_check</tt><big>(</big><em>node</em><big>)</big><a class="reference internal" href="_modules/waflib/Configure.html#download_check"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#waflib.Configure.download_check" title="Permalink to this definition">¶</a></dt> <dd><p>Hook to check for the tools which are downloaded. Replace with your function if necessary.</p> </dd></dl> <dl class="function"> <dt id="waflib.Configure.download_tool"> <tt class="descclassname">waflib.Configure.</tt><tt class="descname">download_tool</tt><big>(</big><em>tool</em>, <em>force=False</em>, <em>ctx=None</em><big>)</big><a class="reference internal" href="_modules/waflib/Configure.html#download_tool"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#waflib.Configure.download_tool" title="Permalink to this definition">¶</a></dt> <dd><p>Download a Waf tool from the remote repository defined in <a class="reference internal" href="Context.html#waflib.Context.remote_repo" title="waflib.Context.remote_repo"><tt class="xref py py-const docutils literal"><span class="pre">waflib.Context.remote_repo</span></tt></a>:</p> <div class="highlight-python"><pre>$ waf configure --download</pre> </div> </dd></dl> <dl class="class"> <dt id="waflib.Configure.ConfigurationContext"> <em class="property">class </em><tt class="descclassname">waflib.Configure.</tt><tt class="descname">ConfigurationContext</tt><big>(</big><em>**kw</em><big>)</big><a class="reference internal" href="_modules/waflib/Configure.html#ConfigurationContext"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#waflib.Configure.ConfigurationContext" title="Permalink to this definition">¶</a></dt> <dd><p>Bases: <a class="reference internal" href="Context.html#waflib.Context.Context" title="waflib.Context.Context"><tt class="xref py py-class docutils literal"><span class="pre">waflib.Context.Context</span></tt></a></p> <p>Configure the project.</p> <p>Waf tools may bind new methods to this class:</p> <div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">waflib.Configure</span> <span class="kn">import</span> <span class="n">conf</span> <span class="nd">@conf</span> <span class="k">def</span> <span class="nf">myhelper</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span> <span class="k">print</span><span class="p">(</span><span class="s">"myhelper"</span><span class="p">)</span> <span class="k">def</span> <span class="nf">configure</span><span class="p">(</span><span class="n">ctx</span><span class="p">):</span> <span class="n">ctx</span><span class="o">.</span><span class="n">myhelper</span><span class="p">()</span> </pre></div> </div> <dl class="attribute"> <dt id="waflib.Configure.ConfigurationContext.cmd"> <tt class="descname">cmd</tt><em class="property"> = 'configure'</em><a class="headerlink" href="#waflib.Configure.ConfigurationContext.cmd" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> <dl class="attribute"> <dt id="waflib.Configure.ConfigurationContext.error_handlers"> <tt class="descname">error_handlers</tt><em class="property"> = []</em><a class="headerlink" href="#waflib.Configure.ConfigurationContext.error_handlers" title="Permalink to this definition">¶</a></dt> <dd><p>Additional functions to handle configuration errors</p> </dd></dl> <dl class="method"> <dt id="waflib.Configure.ConfigurationContext.setenv"> <tt class="descname">setenv</tt><big>(</big><em>name</em>, <em>env=None</em><big>)</big><a class="reference internal" href="_modules/waflib/Configure.html#ConfigurationContext.setenv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#waflib.Configure.ConfigurationContext.setenv" title="Permalink to this definition">¶</a></dt> <dd><p>Set a new config set for conf.env. If a config set of that name already exists, recall it without modification.</p> <p>The name is the filename prefix to save to <tt class="docutils literal"><span class="pre">c4che/NAME_cache.py</span></tt>, and it is also used as <em>variants</em> by the build commands. Though related to variants, whatever kind of data may be stored in the config set:</p> <div class="highlight-python"><div class="highlight"><pre><span class="k">def</span> <span class="nf">configure</span><span class="p">(</span><span class="n">cfg</span><span class="p">):</span> <span class="n">cfg</span><span class="o">.</span><span class="n">env</span><span class="o">.</span><span class="n">ONE</span> <span class="o">=</span> <span class="mi">1</span> <span class="n">cfg</span><span class="o">.</span><span class="n">setenv</span><span class="p">(</span><span class="s">'foo'</span><span class="p">)</span> <span class="n">cfg</span><span class="o">.</span><span class="n">env</span><span class="o">.</span><span class="n">ONE</span> <span class="o">=</span> <span class="mi">2</span> <span class="k">def</span> <span class="nf">build</span><span class="p">(</span><span class="n">bld</span><span class="p">):</span> <span class="mi">2</span> <span class="o">==</span> <span class="n">bld</span><span class="o">.</span><span class="n">env_of_name</span><span class="p">(</span><span class="s">'foo'</span><span class="p">)</span><span class="o">.</span><span class="n">ONE</span> </pre></div> </div> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> <li><strong>name</strong> (<em>string</em>) – name of the configuration set</li> <li><strong>env</strong> (<a class="reference internal" href="ConfigSet.html#waflib.ConfigSet.ConfigSet" title="waflib.ConfigSet.ConfigSet"><tt class="xref py py-class docutils literal"><span class="pre">waflib.ConfigSet.ConfigSet</span></tt></a>) – ConfigSet to copy, or an empty ConfigSet is created</li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="method"> <dt id="waflib.Configure.ConfigurationContext.get_env"> <tt class="descname">get_env</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/waflib/Configure.html#ConfigurationContext.get_env"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#waflib.Configure.ConfigurationContext.get_env" title="Permalink to this definition">¶</a></dt> <dd><p>Getter for the env property</p> </dd></dl> <dl class="method"> <dt id="waflib.Configure.ConfigurationContext.set_env"> <tt class="descname">set_env</tt><big>(</big><em>val</em><big>)</big><a class="reference internal" href="_modules/waflib/Configure.html#ConfigurationContext.set_env"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#waflib.Configure.ConfigurationContext.set_env" title="Permalink to this definition">¶</a></dt> <dd><p>Setter for the env property</p> </dd></dl> <dl class="attribute"> <dt id="waflib.Configure.ConfigurationContext.env"> <tt class="descname">env</tt><a class="headerlink" href="#waflib.Configure.ConfigurationContext.env" title="Permalink to this definition">¶</a></dt> <dd><p>Getter for the env property</p> </dd></dl> <dl class="method"> <dt id="waflib.Configure.ConfigurationContext.init_dirs"> <tt class="descname">init_dirs</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/waflib/Configure.html#ConfigurationContext.init_dirs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#waflib.Configure.ConfigurationContext.init_dirs" title="Permalink to this definition">¶</a></dt> <dd><p>Initialize the project directory and the build directory</p> </dd></dl> <dl class="method"> <dt id="waflib.Configure.ConfigurationContext.execute"> <tt class="descname">execute</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/waflib/Configure.html#ConfigurationContext.execute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#waflib.Configure.ConfigurationContext.execute" title="Permalink to this definition">¶</a></dt> <dd><p>See <a class="reference internal" href="Context.html#waflib.Context.Context.execute" title="waflib.Context.Context.execute"><tt class="xref py py-func docutils literal"><span class="pre">waflib.Context.Context.execute()</span></tt></a></p> </dd></dl> <dl class="method"> <dt id="waflib.Configure.ConfigurationContext.prepare_env"> <tt class="descname">prepare_env</tt><big>(</big><em>env</em><big>)</big><a class="reference internal" href="_modules/waflib/Configure.html#ConfigurationContext.prepare_env"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#waflib.Configure.ConfigurationContext.prepare_env" title="Permalink to this definition">¶</a></dt> <dd><p>Insert <em>PREFIX</em>, <em>BINDIR</em> and <em>LIBDIR</em> values into <tt class="docutils literal"><span class="pre">env</span></tt></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>env</strong> (<a class="reference internal" href="ConfigSet.html#waflib.ConfigSet.ConfigSet" title="waflib.ConfigSet.ConfigSet"><tt class="xref py py-class docutils literal"><span class="pre">waflib.ConfigSet.ConfigSet</span></tt></a>) – a ConfigSet, usually <tt class="docutils literal"><span class="pre">conf.env</span></tt></td> </tr> </tbody> </table> </dd></dl> <dl class="method"> <dt id="waflib.Configure.ConfigurationContext.store"> <tt class="descname">store</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/waflib/Configure.html#ConfigurationContext.store"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#waflib.Configure.ConfigurationContext.store" title="Permalink to this definition">¶</a></dt> <dd><p>Save the config results into the cache file</p> </dd></dl> <dl class="method"> <dt id="waflib.Configure.ConfigurationContext.load"> <tt class="descname">load</tt><big>(</big><em>input</em>, <em>tooldir=None</em>, <em>funs=None</em>, <em>download=True</em><big>)</big><a class="reference internal" href="_modules/waflib/Configure.html#ConfigurationContext.load"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#waflib.Configure.ConfigurationContext.load" title="Permalink to this definition">¶</a></dt> <dd><p>Load Waf tools, which will be imported whenever a build is started.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> <li><strong>input</strong> (<em>list of string</em>) – waf tools to import</li> <li><strong>tooldir</strong> (<em>list of string</em>) – paths for the imports</li> <li><strong>funs</strong> (<em>list of string</em>) – functions to execute from the waf tools</li> <li><strong>download</strong> (<em>bool</em>) – whether to download the tool from the waf repository</li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="method"> <dt id="waflib.Configure.ConfigurationContext.post_recurse"> <tt class="descname">post_recurse</tt><big>(</big><em>node</em><big>)</big><a class="reference internal" href="_modules/waflib/Configure.html#ConfigurationContext.post_recurse"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#waflib.Configure.ConfigurationContext.post_recurse" title="Permalink to this definition">¶</a></dt> <dd><p>Records the path and a hash of the scripts visited, see <a class="reference internal" href="Context.html#waflib.Context.Context.post_recurse" title="waflib.Context.Context.post_recurse"><tt class="xref py py-meth docutils literal"><span class="pre">waflib.Context.Context.post_recurse()</span></tt></a></p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>node</strong> (<a class="reference internal" href="Node.html#waflib.Node.Node" title="waflib.Node.Node"><tt class="xref py py-class docutils literal"><span class="pre">waflib.Node.Node</span></tt></a>) – script</td> </tr> </tbody> </table> </dd></dl> <dl class="method"> <dt id="waflib.Configure.ConfigurationContext.eval_rules"> <tt class="descname">eval_rules</tt><big>(</big><em>rules</em><big>)</big><a class="reference internal" href="_modules/waflib/Configure.html#ConfigurationContext.eval_rules"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#waflib.Configure.ConfigurationContext.eval_rules" title="Permalink to this definition">¶</a></dt> <dd><p>Execute the configuration tests. The method <a class="reference internal" href="#waflib.Configure.ConfigurationContext.err_handler" title="waflib.Configure.ConfigurationContext.err_handler"><tt class="xref py py-meth docutils literal"><span class="pre">waflib.Configure.ConfigurationContext.err_handler()</span></tt></a> is used to process the eventual exceptions</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>rules</strong> (<em>list of string</em>) – list of configuration method names</td> </tr> </tbody> </table> </dd></dl> <dl class="method"> <dt id="waflib.Configure.ConfigurationContext.err_handler"> <tt class="descname">err_handler</tt><big>(</big><em>fun</em>, <em>error</em><big>)</big><a class="reference internal" href="_modules/waflib/Configure.html#ConfigurationContext.err_handler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#waflib.Configure.ConfigurationContext.err_handler" title="Permalink to this definition">¶</a></dt> <dd><p>Error handler for the configuration tests, the default is to let the exception raise</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> <li><strong>fun</strong> (<em>method</em>) – configuration test</li> <li><strong>error</strong> (<em>exception</em>) – exception</li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="attribute"> <dt id="waflib.Configure.ConfigurationContext.__doc__"> <tt class="descname">__doc__</tt><em class="property"> = '\n\tConfigure the project.\n\n\tWaf tools may bind new methods to this class::\n\n\t\tfrom waflib.Configure import conf\n\t\t@conf\n\t\tdef myhelper(self):\n\t\t\tprint("myhelper")\n\n\t\tdef configure(ctx):\n\t\t\tctx.myhelper()\n'</em><a class="headerlink" href="#waflib.Configure.ConfigurationContext.__doc__" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> <dl class="attribute"> <dt id="waflib.Configure.ConfigurationContext.__module__"> <tt class="descname">__module__</tt><em class="property"> = 'waflib.Configure'</em><a class="headerlink" href="#waflib.Configure.ConfigurationContext.__module__" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> <dl class="attribute"> <dt id="waflib.Configure.ConfigurationContext.fun"> <tt class="descname">fun</tt><em class="property"> = 'configure'</em><a class="headerlink" href="#waflib.Configure.ConfigurationContext.fun" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </dd></dl> <dl class="function"> <dt id="waflib.Configure.conf"> <tt class="descclassname">waflib.Configure.</tt><tt class="descname">conf</tt><big>(</big><em>f</em><big>)</big><a class="reference internal" href="_modules/waflib/Configure.html#conf"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#waflib.Configure.conf" title="Permalink to this definition">¶</a></dt> <dd><p>Decorator: attach new configuration functions to <a class="reference internal" href="Build.html#waflib.Build.BuildContext" title="waflib.Build.BuildContext"><tt class="xref py py-class docutils literal"><span class="pre">waflib.Build.BuildContext</span></tt></a> and <a class="reference internal" href="#waflib.Configure.ConfigurationContext" title="waflib.Configure.ConfigurationContext"><tt class="xref py py-class docutils literal"><span class="pre">waflib.Configure.ConfigurationContext</span></tt></a>. The methods bound will accept a parameter named ‘mandatory’ to disable the configuration errors:</p> <div class="highlight-python"><div class="highlight"><pre><span class="k">def</span> <span class="nf">configure</span><span class="p">(</span><span class="n">conf</span><span class="p">):</span> <span class="n">conf</span><span class="o">.</span><span class="n">find_program</span><span class="p">(</span><span class="s">'abc'</span><span class="p">,</span> <span class="n">mandatory</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span> </pre></div> </div> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>f</strong> (<em>function</em>) – method to bind</td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="waflib.Configure.add_os_flags"> <tt class="descclassname">waflib.Configure.</tt><tt class="descname">add_os_flags</tt><big>(</big><em>self</em>, <em>var</em>, <em>dest=None</em><big>)</big><a class="reference internal" href="_modules/waflib/Configure.html#add_os_flags"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#waflib.Configure.add_os_flags" title="Permalink to this definition">¶</a></dt> <dd><p>Import operating system environment values into <tt class="docutils literal"><span class="pre">conf.env</span></tt> dict:</p> <div class="highlight-python"><div class="highlight"><pre><span class="k">def</span> <span class="nf">configure</span><span class="p">(</span><span class="n">conf</span><span class="p">):</span> <span class="n">conf</span><span class="o">.</span><span class="n">add_os_flags</span><span class="p">(</span><span class="s">'CFLAGS'</span><span class="p">)</span> </pre></div> </div> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> <li><strong>var</strong> (<em>string</em>) – variable to use</li> <li><strong>dest</strong> (<em>string</em>) – destination variable, by default the same as var</li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="waflib.Configure.cmd_to_list"> <tt class="descclassname">waflib.Configure.</tt><tt class="descname">cmd_to_list</tt><big>(</big><em>self</em>, <em>cmd</em><big>)</big><a class="reference internal" href="_modules/waflib/Configure.html#cmd_to_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#waflib.Configure.cmd_to_list" title="Permalink to this definition">¶</a></dt> <dd><p>Detect if a command is written in pseudo shell like <tt class="docutils literal"><span class="pre">ccache</span> <span class="pre">g++</span></tt> and return a list.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>cmd</strong> (<em>a string or a list of string</em>) – command</td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="waflib.Configure.check_waf_version"> <tt class="descclassname">waflib.Configure.</tt><tt class="descname">check_waf_version</tt><big>(</big><em>self</em>, <em>mini='1.6.99'</em>, <em>maxi='1.8.0'</em><big>)</big><a class="reference internal" href="_modules/waflib/Configure.html#check_waf_version"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#waflib.Configure.check_waf_version" title="Permalink to this definition">¶</a></dt> <dd><p>Raise a Configuration error if the Waf version does not strictly match the given bounds:</p> <div class="highlight-python"><div class="highlight"><pre><span class="n">conf</span><span class="o">.</span><span class="n">check_waf_version</span><span class="p">(</span><span class="n">mini</span><span class="o">=</span><span class="s">'1.7.0'</span><span class="p">,</span> <span class="n">maxi</span><span class="o">=</span><span class="s">'1.8.0'</span><span class="p">)</span> </pre></div> </div> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> <li><strong>mini</strong> (<em>number, tuple or string</em>) – Minimum required version</li> <li><strong>maxi</strong> (<em>number, tuple or string</em>) – Maximum allowed version</li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="waflib.Configure.find_file"> <tt class="descclassname">waflib.Configure.</tt><tt class="descname">find_file</tt><big>(</big><em>self</em>, <em>filename</em>, <em>path_list=</em><span class="optional">[</span><span class="optional">]</span><big>)</big><a class="reference internal" href="_modules/waflib/Configure.html#find_file"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#waflib.Configure.find_file" title="Permalink to this definition">¶</a></dt> <dd><p>Find a file in a list of paths</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>filename</strong> – name of the file to search for</li> <li><strong>path_list</strong> – list of directories to search</li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the first occurrence filename or ‘’ if filename could not be found</p> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="waflib.Configure.find_program"> <tt class="descclassname">waflib.Configure.</tt><tt class="descname">find_program</tt><big>(</big><em>self</em>, <em>filename</em>, <em>**kw</em><big>)</big><a class="reference internal" href="_modules/waflib/Configure.html#find_program"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#waflib.Configure.find_program" title="Permalink to this definition">¶</a></dt> <dd><p>Search for a program on the operating system</p> <p>When var is used, you may set os.environ[var] to help find a specific program version, for example:</p> <div class="highlight-python"><pre>$ VALAC=/usr/bin/valac_test waf configure</pre> </div> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> <li><strong>path_list</strong> – paths to use for searching</li> <li><strong>var</strong> (<em>string</em>) – store the result to conf.env[var], by default use filename.upper()</li> <li><strong>ext</strong> (<em>list of string</em>) – list of extensions for the binary (do not add an extension for portability)</li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="function"> <dt id="waflib.Configure.find_perl_program"> <tt class="descclassname">waflib.Configure.</tt><tt class="descname">find_perl_program</tt><big>(</big><em>self</em>, <em>filename</em>, <em>path_list=</em><span class="optional">[</span><span class="optional">]</span>, <em>var=None</em>, <em>environ=None</em>, <em>exts=''</em><big>)</big><a class="reference internal" href="_modules/waflib/Configure.html#find_perl_program"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#waflib.Configure.find_perl_program" title="Permalink to this definition">¶</a></dt> <dd><p>Search for a perl program on the operating system</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> <li><strong>filename</strong> (<em>string</em>) – file to search for</li> <li><strong>path_list</strong> (<em>list of string</em>) – list of paths to look into</li> <li><strong>var</strong> (<em>string</em>) – store the results into <em>conf.env.var</em></li> <li><strong>environ</strong> (<em>dict</em>) – operating system environment to pass to <a class="reference internal" href="#waflib.Configure.find_program" title="waflib.Configure.find_program"><tt class="xref py py-func docutils literal"><span class="pre">waflib.Configure.find_program()</span></tt></a></li> <li><strong>exts</strong> (<em>list</em>) – extensions given to <a class="reference internal" href="#waflib.Configure.find_program" title="waflib.Configure.find_program"><tt class="xref py py-func docutils literal"><span class="pre">waflib.Configure.find_program()</span></tt></a></li> </ul> </td> </tr> </tbody> </table> </dd></dl> </div> </div> </div> </div> <div class="sphinxsidebar"> <div class="sphinxsidebarwrapper"> <h4>Previous topic</h4> <p class="topless"><a href="ConfigSet.html" title="previous chapter">ConfigSet</a></p> <h4>Next topic</h4> <p class="topless"><a href="Context.html" title="next chapter">Context</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="_sources/Configure.txt" rel="nofollow">Show Source</a></li> </ul> <div id="searchbox" style="display: none"> <h3>Quick search</h3> <form class="search" action="search.html" method="get"> <input type="text" name="q" /> <input type="submit" value="Go" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> <p class="searchtip" style="font-size: 90%"> Enter search terms or a module, class or function name. </p> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="Context.html" title="Context" >next</a> |</li> <li class="right" > <a href="ConfigSet.html" title="ConfigSet" >previous</a> |</li> <li><a href="index.html">Waf 1.7.11 documentation</a> »</li> </ul> </div> <div class="footer"> © <a href="copyright.html">Copyright</a> 2010, Thomas Nagy. </div> </body> </html>