Skip to content

Commit

Permalink
Docs for source_buildenv (#3493)
Browse files Browse the repository at this point in the history
* Docs for source_buildenv

* Update reference/conanfile/attributes/sources.inc

Co-authored-by: James <memsharded@gmail.com>

* Update reference/conanfile/attributes/sources.inc

Co-authored-by: James <memsharded@gmail.com>

* Update reference/conanfile/attributes/sources.inc

* Update reference/conanfile/attributes/sources.inc

Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>

* Update reference/conanfile/attributes/sources.inc

* Update reference/conanfile/attributes/sources.inc

---------

Co-authored-by: James <memsharded@gmail.com>
Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>
  • Loading branch information
3 people authored Dec 19, 2023
1 parent 6376205 commit 709f913
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion reference/conanfile/attributes/sources.inc
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,25 @@ For example, a *conandata.yml* with information about sources that looks like th
.. code-block:: python
def source(self):
tools.get(**self.conan_data["sources"][self.version])
get(self, **self.conan_data["sources"][self.version])
source_buildenv
---------------
Boolean attribute to opt-out from injecting the :ref:`VirtualBuildEnv<conan_tools_env_virtualbuildenv>` generated environment while running the `source()` method.
Setting this attribute to `False` (default value `True`) will prevent Conan from injecting the ``VirtualBuildEnv`` generated environment from tool requires
when executing the `source()` method.
.. code-block:: python
:emphasize-lines: 4,5,8
class MyConan:
name = "mylib"
version = "1.0.0"
source_buildenv = False
tool_requires = "7zip/1.2.0"
def source(self):
get(self, **self.conan_data["sources"][self.version])
self.run("7z x *.zip -o*") ## Error! tool require not available

0 comments on commit 709f913

Please sign in to comment.