Skip to content

Commit 5d089a9

Browse files
authored
Merge pull request #4461 from conan-io/release/2.28
Sync develop2
2 parents 4597f5c + 35faafc commit 5d089a9

6 files changed

Lines changed: 31 additions & 5 deletions

File tree

ci_tutorial/project_setup.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ We need 3 different repositories in the same server. Make sure to have an Artifa
2222
$ docker run --name artifactory -d -p 8081:8081 -p 8082:8082 releases-docker.jfrog.io/jfrog/artifactory-cpp-ce:7.63.12
2323
# Can be stopped with "docker stop artifactory"
2424
25-
When you launch it, you can go to http://localhost:8081/ to check it (user: "admin", password: "password").
25+
When you launch it, you can go to http://localhost:8082/ to check it (user: "admin", password: "password").
2626
If you have another available Artifactory, it can be used too if you can create new repositories there.
2727

2828

reference/binary_model/dependencies.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ This means it was using "non-embed" mode. The default of non-embed mode is ``min
5353

5454
- If a recipe defines ``required_conan_version = ">=2.28"`` or higher, it will automatically enable the new fixed ``package_id`` computation.
5555
Recipes that don't update their required Conan version will still use the older ``package_id``.
56-
- If the global configuration in ``global.conf`` defines the ``core.policies=["required_conan_version>=2.28"]`` it will have the same behavior,
56+
- If the global configuration in ``global.conf`` defines the ``core:policies=["required_conan_version>=2.28"]`` it will have the same behavior,
5757
enabling this bugfix for all packages. See the :ref:`documentation for policies<reference_policies>` for more information.
5858
- The recommendation is to activate the new behavior via policies. It will save resources like build time, and it will also be more future-proof,
5959
future Conan versions might enable this behavior unconditionally.

reference/conanfile/attributes/binary_model.inc

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,34 @@ If some package want to use both some build scripts and link with a given librar
4545
recommended to define it, and it should be defined in most cases.
4646

4747

48+
.. note::
49+
50+
The ``package_type`` attribute can also be computed dynamically in both
51+
the ``config_options()`` and ``configure()`` methods, for example, a recipe might not support
52+
building shared libraries in a specific platform. This can be defined as:
53+
54+
.. code-block:: python
55+
56+
package_type = "library"
57+
options = {"shared": [True, False]}
58+
59+
def config_options(self):
60+
if self.settings.os == "Windows":
61+
del self.options.shared
62+
self.package_type = "static-library"
63+
64+
where care should be taken when accessing the ``shared`` option, as it will be removed for Windows,
65+
so the ``self.options.get_safe("shared")`` accessor should be used as appropiate.
66+
4867
.. _conan_conanfile_properties_settings:
4968

5069
settings
5170
--------
5271

5372
List of strings with the first level settings (from :ref:`reference_config_files_settings_yml`) that the recipe
5473
needs, because:
55-
- They are read for building (e.g: `if self.settings.compiler == "gcc"`)
74+
75+
- They are read for building (e.g: ``if self.settings.compiler == "gcc"``)
5676
- They affect the ``package_id``. If a value of the declared setting changes, the ``package_id`` has to be different.
5777

5878
The most common is to declare:

reference/conanfile/methods/generate.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,12 @@ They can be used in the same way:
263263
for require, dependency in self.dependencies.build.items():
264264
# do something, only build deps here
265265
266+
.. note::
267+
268+
By default, indexing into ``self.dependencies[...]`` returns dependencies in the *host* context.
269+
If you need to access dependencies that belong to the *build* context (e.g. ``cmake``),
270+
use the ``self.dependencies.build[...]`` filter helper, as shown in the example above.
271+
266272

267273
Dependencies ``cpp_info`` interface
268274
+++++++++++++++++++++++++++++++++++

tutorial/conan_repositories/setting_up_conan_remotes/artifactory/artifactory_ce_cpp.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ downloading installers from `Download Page <https://conan.io/downloads.html>`_ a
3232
After unzipping these installers, Artifactory can be launched by double-clicking
3333
the ``artifactory.bat`` on Windows or ``artifactory.sh`` script in the *app/bin* subfolder, depending on the OS.
3434

35-
Once Artifactory has started, navigate to the default URL `http://localhost:8081` where
35+
Once Artifactory has started, navigate to the default URL `http://localhost:8082` where
3636
the Web UI should be running. The default user and password are ``admin:password``.
3737

3838
Creating and Using a Conan Repo

tutorial/versioning/lockfiles.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ purpose:
271271
"python_requires": []
272272
}
273273
274-
It is relevant to note that the ``-lockfile-clean`` could remove locked versions in
274+
It is relevant to note that the ``--lockfile-clean`` could remove locked versions in
275275
given configurations. For example, if instead of the above, the ``x86_64`` architecture
276276
is used, the ``--lockfile-clean`` will prune the "unused" ``sound32``, because in that
277277
configuration is not used. It is possible to evaluate new lockfiles for every different

0 commit comments

Comments
 (0)