Skip to content

Commit eb2b5cd

Browse files
authored
exports conf (#3703)
1 parent 75a6aca commit eb2b5cd

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

reference/conanfile/methods/export.rst

+2
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,7 @@ There are 2 files that are always exported to the cache, without being explicitl
3333
**Best practices**
3434

3535
- The recipe files must be configuration independent. Those files are common for all configurations, thus it is not possible to do conditional ``export()`` to different settings, options, or platforms. Do not try to do any kind of conditional export. If necessary export all the files necessary for all configurations at once.
36+
- The ``export()`` method does not receive any information from profiles, not even ``conf``. Only the ``global.conf`` will be available, and in any case it is not possible to use that ``conf`` to define conditionals.
37+
- Keep the ``export()`` method simple. Its intention is to copy files from the user folder to the cache to store those files together with the recipe.
3638
- The exported files must be small. Exporting big files with the recipe will make the resolution of dependencies much slower the resolution.
3739
- Only files that are necessary for the evaluation of the ``conanfile.py`` recipe must be exported with this method. Files necessary for building from sources should be exported with the ``exports_sources`` attribute or the :ref:`export_source()<reference_conanfile_methods_export_sources>` method.

reference/conanfile/methods/export_sources.rst

+3-4
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ in the ``conandata.yml`` file, which could be later applied with ``apply_conanda
5656

5757
**Best practices**
5858

59-
The recipe sources must be configuration independent. Those sources are common for all configurations,
60-
thus it is not possible to do conditional ``export_sources()`` to different settings, options, or
61-
platforms. Do not try to do any kind of conditional export. If necessary export all the files necessary for
62-
all configurations at once.
59+
- The recipe sources must be configuration independent. Those sources are common for all configurations, thus it is not possible to do conditional ``export_sources()`` to different settings, options, or platforms. Do not try to do any kind of conditional export. If necessary export all the files necessary for all configurations at once.
60+
- The ``export_sources()`` method does not receive any information from profiles, not even ``conf``. Only the ``global.conf`` will be available, and in any case it is not possible to use that ``conf`` to define conditionals.
61+
- Keep the ``export_source()`` method simple. Its intention is to copy files from the user folder to the cache to store those files together with the recipe.

0 commit comments

Comments
 (0)