From 9b20046a0f757e6b7a91685ca74a372b91c7a9af Mon Sep 17 00:00:00 2001 From: James Date: Wed, 13 Jul 2022 12:04:50 +0200 Subject: [PATCH 1/7] fix several issues (#2642) --- migrating_to_2.0/recipes.rst | 1 - reference/conanfile/tools/files/basic.rst | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/migrating_to_2.0/recipes.rst b/migrating_to_2.0/recipes.rst index c227bb785e5..7a5ac134754 100644 --- a/migrating_to_2.0/recipes.rst +++ b/migrating_to_2.0/recipes.rst @@ -241,7 +241,6 @@ A typical anti-pattern in the recipes that can be solved with a ``layout()`` dec class Pkg(Conanfile): - @property def layout(self): basic_layout(self, src_folder="source") diff --git a/reference/conanfile/tools/files/basic.rst b/reference/conanfile/tools/files/basic.rst index 966426394e3..a35d92770f1 100644 --- a/reference/conanfile/tools/files/basic.rst +++ b/reference/conanfile/tools/files/basic.rst @@ -191,7 +191,7 @@ conan.tools.files.rmdir() .. code-block:: python - def rmdir(path) + def rmdir(conanfile, path) Utility functions to remove a directory. The existence of the specified directory is checked, so ``rmdir()`` will do nothing if the directory doesn't exists. @@ -208,6 +208,10 @@ Parameters: - **conanfile**: Conanfile object. - **path**: Path to the directory. +The behavior regarding the path is the same as Python ``shutil.rmtree``. The provided path can be +relative to the current folder (the current folder depends in which method this tool is used), or +it can be an absolute path. + conan.tools.files.chdir() ------------------------- From 2676a6a8a225a11c4e032073aa24a3d41a4f06cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Ram=C3=ADrez?= Date: Wed, 13 Jul 2022 13:42:30 +0200 Subject: [PATCH 2/7] Adding missing `tools.cmake.cmaketoolchain:generator` configuration (#2647) * Adding missing tools.cmake.cmaketoolchain:generator conf * fixed --- reference/conanfile/tools/cmake/cmaketoolchain.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/reference/conanfile/tools/cmake/cmaketoolchain.rst b/reference/conanfile/tools/cmake/cmaketoolchain.rst index 63ece125b49..74927409eeb 100644 --- a/reference/conanfile/tools/cmake/cmaketoolchain.rst +++ b/reference/conanfile/tools/cmake/cmaketoolchain.rst @@ -302,6 +302,7 @@ conf ``CMakeToolchain`` is affected by these :ref:`[conf]` variables: +- ``tools.cmake.cmaketoolchain:generator`` CMake generator to be used by cmake CLI. See all the CMake generators `here `__. - ``tools.cmake.cmaketoolchain:toolchain_file`` user toolchain file to replace the ``conan_toolchain.cmake`` one. - ``tools.cmake.cmaketoolchain:user_toolchain`` list of user toolchains to be included from the ``conan_toolchain.cmake`` file. - ``tools.android:ndk_path`` value for ``ANDROID_NDK_PATH``. From 03b40e27bb0014a84c6c47baf0a37a5905187ccb Mon Sep 17 00:00:00 2001 From: James Date: Thu, 14 Jul 2022 09:49:47 +0200 Subject: [PATCH 3/7] fixing editable docs (#2648) --- developing_packages/editable_packages.rst | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/developing_packages/editable_packages.rst b/developing_packages/editable_packages.rst index 7e034b8bbce..873aaa6a46c 100644 --- a/developing_packages/editable_packages.rst +++ b/developing_packages/editable_packages.rst @@ -73,15 +73,15 @@ Now the ``say/0.1@user/channel`` package is in editable mode, lets build it loca # windows, we will build 2 configurations to show multi-config $ conan install . -s build_type=Release $ conan install . -s build_type=Debug - $ mkdir build && cd build - $ cmake .. -DCMAKE_TOOLCHAIN_FILE=conan/conan_toolchain.cmake + $ cd build + $ cmake .. -DCMAKE_TOOLCHAIN_FILE=generators/conan_toolchain.cmake $ cmake --build . --config Release $ cmake --build . --config Debug # Linux, we will only build 1 configuration $ conan install . - $ mkdir cmake-build-release && cd cmake-build-release - $ cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=conan/conan_toolchain.cmake + $ cd build/Release + $ cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=generators/conan_toolchain.cmake $ cmake --build . @@ -98,8 +98,8 @@ In this case we can build the ``hello`` application as usual: # windows, we will build 2 configurations to show multi-config $ conan install . -s build_type=Release $ conan install . -s build_type=Debug - $ mkdir build && cd build - $ cmake .. -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake + $ cd build + $ cmake .. -DCMAKE_TOOLCHAIN_FILE=generators/conan_toolchain.cmake $ cmake --build . --config Release $ cmake --build . --config Debug $ Release\hello.exe @@ -109,8 +109,8 @@ In this case we can build the ``hello`` application as usual: # Linux, we will only build 1 configuration $ conan install . - $ mkdir cmake-build-release && cd cmake-build-release - $ cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake + $ cd build/Release + $ cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=generators/conan_toolchain.cmake $ cmake --build . $ ./hello say/0.1: Hello World Release! @@ -134,7 +134,7 @@ Lets see it, lets start by doing a change in the ``say`` source code: $ cmake --build . --config Debug # Linux, we will only build 1 configuration - $ cd cmake-build-release + $ cd build/Release $ cmake --build . @@ -154,7 +154,7 @@ And build and run the "hello" project: say/0.1: Bye World Debug! # Linux - $ cd cmake-build-release + $ cd build/Release $ cmake --build . $ ./hello say/0.1: Bye World Release! From fffcd4d6999ef43b26b39f66e2139af662ce9c3c Mon Sep 17 00:00:00 2001 From: Luis Martinez Date: Thu, 14 Jul 2022 11:50:23 +0200 Subject: [PATCH 4/7] Fix build_folder_vars windows (#2650) --- reference/conanfile/tools/cmake/cmake_layout.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/conanfile/tools/cmake/cmake_layout.rst b/reference/conanfile/tools/cmake/cmake_layout.rst index 23dde0f6237..27c5ce9909e 100644 --- a/reference/conanfile/tools/cmake/cmake_layout.rst +++ b/reference/conanfile/tools/cmake/cmake_layout.rst @@ -62,7 +62,7 @@ conf to declare a list of settings or options: .. code:: bash - conan install . -c tools.cmake.cmake_layout:build_folder_vars='["settings.compiler", "options.shared"]' + conan install . -c tools.cmake.cmake_layout:build_folder_vars="['settings.compiler', 'options.shared']" For the previous example, the values assigned by the ``cmake_layout`` (installing the Release/static default configuration) would be: @@ -76,7 +76,7 @@ If we repeat the previous install with a different configuration: .. code:: bash - conan install . -o shared=True -c tools.cmake.cmake_layout:build_folder_vars='["settings.compiler", "options.shared"]' + conan install . -o shared=True -c tools.cmake.cmake_layout:build_folder_vars="['settings.compiler', 'options.shared']" The values assigned by the ``cmake_layout`` (installing the Release/shared configuration) would be: From 82115c337fe6cf2fee226fc3d527dd1e8630a1dd Mon Sep 17 00:00:00 2001 From: Carlos Zoido Date: Thu, 21 Jul 2022 07:25:05 +0200 Subject: [PATCH 5/7] Some notes about migrating from SystemPackageTool to new tools (#2653) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * some notes * minor changes * move * Update migrating_to_2.0/recipes.rst Co-authored-by: Francisco Ramírez * Update migrating_to_2.0/recipes.rst Co-authored-by: Francisco Ramírez --- migrating_to_2.0/recipes.rst | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/migrating_to_2.0/recipes.rst b/migrating_to_2.0/recipes.rst index 7a5ac134754..15c2390ece1 100644 --- a/migrating_to_2.0/recipes.rst +++ b/migrating_to_2.0/recipes.rst @@ -841,7 +841,14 @@ If any manipulation to the symlinks is required, the package :ref:`conan.tools.f contains some tools to help with that. +New tools for managing system package managers +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +There are some changes you should be aware of if you are migrating from +:ref:`systempackagetool` to the new :ref:`conan_tools_system_package_manager` to prepare +the recipe for Conan 2.0: - - +* Unlike in ``SystemPackageTool`` that uses ``CONAN_SYSREQUIRES_SUDO`` and is set to ``True`` + as default, the ``tools.system.package_manager:sudo`` configuration is ``False`` by default. +* :ref:`systempackagetool` is initialized with ``default_mode='enabled'`` but for these new + tools ``tools.system.package_manager:mode='check'`` by default. From 1a3e14e6f820448f1e09573780632b0956c631ba Mon Sep 17 00:00:00 2001 From: Chris Mc Date: Tue, 26 Jul 2022 02:03:44 -0700 Subject: [PATCH 6/7] Preset names are lowercase (#2659) https://github.com/conan-io/conan/blob/6a6ff6e07526b05d51998a5c5ed54936f0fd7ff9/conans/test/functional/toolchains/cmake/test_cmake_toolchain.py#L137-L139 Co-authored-by: James --- reference/conanfile/tools/cmake/cmaketoolchain.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/reference/conanfile/tools/cmake/cmaketoolchain.rst b/reference/conanfile/tools/cmake/cmaketoolchain.rst index 74927409eeb..98791adc30c 100644 --- a/reference/conanfile/tools/cmake/cmaketoolchain.rst +++ b/reference/conanfile/tools/cmake/cmaketoolchain.rst @@ -286,15 +286,15 @@ so you can use the ``--preset`` argument from ``cmake >= 3.23`` or use an IDE: $ conan install . -s build_type=Debug # For single-configuration generator - $ cmake --preset Debug - $ cmake --build --preset Debug - $ cmake --preset Release - $ cmake --build --preset Release + $ cmake --preset debug + $ cmake --build --preset debug + $ cmake --preset release + $ cmake --build --preset release # For multi-configuration generator $ cmake --preset default - $ cmake --build --preset Debug - $ cmake --build --preset Release + $ cmake --build --preset debug + $ cmake --build --preset release conf From 32e1dc2e74cf136e27931b54534b7dfac57e0c9d Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Thu, 28 Jul 2022 10:07:35 +0200 Subject: [PATCH 7/7] Add ACCU 2022 video link (#2665) Signed-off-by: Uilian Ries --- videos.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/videos.rst b/videos.rst index 02f1446228c..9ed19916944 100644 --- a/videos.rst +++ b/videos.rst @@ -14,6 +14,15 @@ Videos and links ================= +- ACCU 2022: Advanced Dependencies Model in Conan 2.0 C, C++ Package Manager by Diego Rodriguez-Losada + + .. raw:: html + +