Skip to content

Commit

Permalink
Automatic deploy (build number 69)
Browse files Browse the repository at this point in the history
  • Loading branch information
ConanCI bot committed May 8, 2024
1 parent 448ecfa commit df241f0
Show file tree
Hide file tree
Showing 8 changed files with 390 additions and 2 deletions.
76 changes: 76 additions & 0 deletions 2.3/_sources/reference/commands/create.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,82 @@ The same happens for lockfiles created with ``--lockfile-out`` argument. The loc
dependencies, you can control their build using the ``--build-test`` argument.


Methods execution order
-----------------------

The ``conan create`` executes :ref:`methods <reference_conanfile_methods>` of a *conanfile.py* in the following order:

#. Export recipe to the cache
#. ``init()``
#. ``set_name()``
#. ``set_version()``
#. ``export()``
#. ``export_sources()``
#. Compute dependency graph
#. ``ìnit()``
#. ``config_options()``
#. ``configure()``
#. ``requirements()``
#. ``build_requirements()``
#. Compute necessary packages
#. ``validate_build()``
#. ``validate()``
#. ``package_id()``
#. ``layout()``
#. ``system_requirements()``
#. Install packages
#. ``source()``
#. ``build_id()``
#. ``generate()``
#. ``build()``
#. ``package()``
#. ``package_info()``

Steps ``generate()``, ``build()``, ``package()`` from *Install packages* step will not be called if the package
is not being built from sources.

After that, if you have a folder named *test_package* in your project or you call the ``conan create`` command with the
``--test-folder`` flag, the command will invoke the methods of the *conanfile.py* file inside the folder in the following order:

#. Launch test_package
#. (test package) ``init()``
#. (test package) ``set_name()``
#. (test package) ``set_version()``
#. Compute dependency graph
#. (test package) ``config_options()``
#. (test package) ``configure()``
#. (test package) ``requirements()``
#. (test package) ``build_requirements()``
#. ``ìnit()``
#. ``config_options()``
#. ``configure()``
#. ``requirements()``
#. ``build_requirements()``
#. Compute necessary packages
#. ``validate_build()``
#. ``validate()``
#. ``package_id()``
#. ``layout()``
#. (test package) ``validate_build()``
#. (test package) ``validate()``
#. (test package) ``package_id()``
#. (test package) ``layout()``
#. ``system_requirements()``
#. (test package) ``system_requirements()``
#. Install packages
#. ``build_id()``
#. ``generate()``
#. ``build()``
#. ``package_info()``
#. Test the package
#. (test package) ``build()``
#. (test package) ``test()``

The functions with *(test package)* belong to the *conanfile.py* in the *test_package* folder. The steps
``build_id()``, ``generate()``, ``build()`` inside the *Install packages* step will be skipped if the project is
already installed. Typically, it should be installed just as it was installed in the previous "install packages" step.


.. seealso::

- Read more about creating packages in the :ref:`dedicated
Expand Down
Binary file modified 2.3/conan.pdf
Binary file not shown.
118 changes: 118 additions & 0 deletions 2.3/reference/commands/create.html
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,124 @@ <h2>Conan create output<a class="headerlink" href="#conan-create-output" title="
functionality is being misused. If, for any reason, your <code class="docutils literal notranslate"><span class="pre">test_package</span></code> has additional
dependencies, you can control their build using the <code class="docutils literal notranslate"><span class="pre">--build-test</span></code> argument.</p>
</div>
</section>
<section id="methods-execution-order">
<h2>Methods execution order<a class="headerlink" href="#methods-execution-order" title="Link to this heading"></a></h2>
<p>The <code class="docutils literal notranslate"><span class="pre">conan</span> <span class="pre">create</span></code> executes <a class="reference internal" href="../conanfile/methods.html#reference-conanfile-methods"><span class="std std-ref">methods</span></a> of a <em>conanfile.py</em> in the following order:</p>
<ol class="arabic simple">
<li><dl class="simple">
<dt>Export recipe to the cache</dt><dd><ol class="arabic simple">
<li><p><code class="docutils literal notranslate"><span class="pre">init()</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">set_name()</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">set_version()</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">export()</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">export_sources()</span></code></p></li>
</ol>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>Compute dependency graph</dt><dd><ol class="arabic simple">
<li><p><code class="docutils literal notranslate"><span class="pre">ìnit()</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">config_options()</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">configure()</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">requirements()</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">build_requirements()</span></code></p></li>
</ol>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>Compute necessary packages</dt><dd><ol class="arabic simple">
<li><p><code class="docutils literal notranslate"><span class="pre">validate_build()</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">validate()</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">package_id()</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">layout()</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">system_requirements()</span></code></p></li>
</ol>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>Install packages</dt><dd><ol class="arabic simple">
<li><p><code class="docutils literal notranslate"><span class="pre">source()</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">build_id()</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">generate()</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">build()</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">package()</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">package_info()</span></code></p></li>
</ol>
</dd>
</dl>
</li>
</ol>
<p>Steps <code class="docutils literal notranslate"><span class="pre">generate()</span></code>, <code class="docutils literal notranslate"><span class="pre">build()</span></code>, <code class="docutils literal notranslate"><span class="pre">package()</span></code> from <em>Install packages</em> step will not be called if the package
is not being built from sources.</p>
<p>After that, if you have a folder named <em>test_package</em> in your project or you call the <code class="docutils literal notranslate"><span class="pre">conan</span> <span class="pre">create</span></code> command with the
<code class="docutils literal notranslate"><span class="pre">--test-folder</span></code> flag, the command will invoke the methods of the <em>conanfile.py</em> file inside the folder in the following order:</p>
<ol class="arabic simple">
<li><dl class="simple">
<dt>Launch test_package</dt><dd><ol class="arabic simple">
<li><p>(test package) <code class="docutils literal notranslate"><span class="pre">init()</span></code></p></li>
<li><p>(test package) <code class="docutils literal notranslate"><span class="pre">set_name()</span></code></p></li>
<li><p>(test package) <code class="docutils literal notranslate"><span class="pre">set_version()</span></code></p></li>
</ol>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>Compute dependency graph</dt><dd><ol class="arabic simple">
<li><p>(test package) <code class="docutils literal notranslate"><span class="pre">config_options()</span></code></p></li>
<li><p>(test package) <code class="docutils literal notranslate"><span class="pre">configure()</span></code></p></li>
<li><p>(test package) <code class="docutils literal notranslate"><span class="pre">requirements()</span></code></p></li>
<li><p>(test package) <code class="docutils literal notranslate"><span class="pre">build_requirements()</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">ìnit()</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">config_options()</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">configure()</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">requirements()</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">build_requirements()</span></code></p></li>
</ol>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>Compute necessary packages</dt><dd><ol class="arabic simple">
<li><p><code class="docutils literal notranslate"><span class="pre">validate_build()</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">validate()</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">package_id()</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">layout()</span></code></p></li>
<li><p>(test package) <code class="docutils literal notranslate"><span class="pre">validate_build()</span></code></p></li>
<li><p>(test package) <code class="docutils literal notranslate"><span class="pre">validate()</span></code></p></li>
<li><p>(test package) <code class="docutils literal notranslate"><span class="pre">package_id()</span></code></p></li>
<li><p>(test package) <code class="docutils literal notranslate"><span class="pre">layout()</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">system_requirements()</span></code></p></li>
<li><p>(test package) <code class="docutils literal notranslate"><span class="pre">system_requirements()</span></code></p></li>
</ol>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>Install packages</dt><dd><ol class="arabic simple">
<li><p><code class="docutils literal notranslate"><span class="pre">build_id()</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">generate()</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">build()</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">package_info()</span></code></p></li>
</ol>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>Test the package</dt><dd><ol class="arabic simple">
<li><p>(test package) <code class="docutils literal notranslate"><span class="pre">build()</span></code></p></li>
<li><p>(test package) <code class="docutils literal notranslate"><span class="pre">test()</span></code></p></li>
</ol>
</dd>
</dl>
</li>
</ol>
<p>The functions with <em>(test package)</em> belong to the <em>conanfile.py</em> in the <em>test_package</em> folder. The steps
<code class="docutils literal notranslate"><span class="pre">build_id()</span></code>, <code class="docutils literal notranslate"><span class="pre">generate()</span></code>, <code class="docutils literal notranslate"><span class="pre">build()</span></code> inside the <em>Install packages</em> step will be skipped if the project is
already installed. Typically, it should be installed just as it was installed in the previous “install packages” step.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<ul class="simple">
Expand Down
2 changes: 1 addition & 1 deletion 2.3/searchindex.js

Large diffs are not rendered by default.

76 changes: 76 additions & 0 deletions 2/_sources/reference/commands/create.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,82 @@ The same happens for lockfiles created with ``--lockfile-out`` argument. The loc
dependencies, you can control their build using the ``--build-test`` argument.


Methods execution order
-----------------------

The ``conan create`` executes :ref:`methods <reference_conanfile_methods>` of a *conanfile.py* in the following order:

#. Export recipe to the cache
#. ``init()``
#. ``set_name()``
#. ``set_version()``
#. ``export()``
#. ``export_sources()``
#. Compute dependency graph
#. ``ìnit()``
#. ``config_options()``
#. ``configure()``
#. ``requirements()``
#. ``build_requirements()``
#. Compute necessary packages
#. ``validate_build()``
#. ``validate()``
#. ``package_id()``
#. ``layout()``
#. ``system_requirements()``
#. Install packages
#. ``source()``
#. ``build_id()``
#. ``generate()``
#. ``build()``
#. ``package()``
#. ``package_info()``

Steps ``generate()``, ``build()``, ``package()`` from *Install packages* step will not be called if the package
is not being built from sources.

After that, if you have a folder named *test_package* in your project or you call the ``conan create`` command with the
``--test-folder`` flag, the command will invoke the methods of the *conanfile.py* file inside the folder in the following order:

#. Launch test_package
#. (test package) ``init()``
#. (test package) ``set_name()``
#. (test package) ``set_version()``
#. Compute dependency graph
#. (test package) ``config_options()``
#. (test package) ``configure()``
#. (test package) ``requirements()``
#. (test package) ``build_requirements()``
#. ``ìnit()``
#. ``config_options()``
#. ``configure()``
#. ``requirements()``
#. ``build_requirements()``
#. Compute necessary packages
#. ``validate_build()``
#. ``validate()``
#. ``package_id()``
#. ``layout()``
#. (test package) ``validate_build()``
#. (test package) ``validate()``
#. (test package) ``package_id()``
#. (test package) ``layout()``
#. ``system_requirements()``
#. (test package) ``system_requirements()``
#. Install packages
#. ``build_id()``
#. ``generate()``
#. ``build()``
#. ``package_info()``
#. Test the package
#. (test package) ``build()``
#. (test package) ``test()``

The functions with *(test package)* belong to the *conanfile.py* in the *test_package* folder. The steps
``build_id()``, ``generate()``, ``build()`` inside the *Install packages* step will be skipped if the project is
already installed. Typically, it should be installed just as it was installed in the previous "install packages" step.


.. seealso::

- Read more about creating packages in the :ref:`dedicated
Expand Down
Binary file modified 2/conan.pdf
Binary file not shown.

0 comments on commit df241f0

Please sign in to comment.