Conan 1.21 Documentationfunctionalities and let users customize the client behavior at determined points. 12.4.1 Hook structure A hook is a Python function that will be executed at certain points of Conan workflow to customize modifying the client sources or the recipe ones. In the hooks reference you can find the full list of hook functions and exhaustive documentation about their arguments. Hooks can implement any functionality: exporting or pack- aging, or interactions with the remotes. Here is an example of a simple hook: Listing 2: example_hook.py from conans import tools def pre_export(output, conanfile, conanfile_path, reference0 码力 | 621 页 | 4.92 MB | 1 年前3
Conan 1.22 Documentationfunctionalities and let users customize the client behavior at determined points. 12.4.1 Hook structure A hook is a Python function that will be executed at certain points of Conan workflow to customize modifying the client sources or the recipe ones. In the hooks reference you can find the full list of hook functions and exhaustive documentation about their arguments. Hooks can implement any functionality: exporting or pack- aging, or interactions with the remotes. Here is an example of a simple hook: Listing 2: example_hook.py from conans import tools def pre_export(output, conanfile, conanfile_path, reference0 码力 | 629 页 | 4.98 MB | 1 年前3
Conan 1.23 Documentationfunctionalities and let users customize the client behavior at determined points. 12.4.1 Hook structure A hook is a Python function that will be executed at certain points of Conan workflow to customize modifying the client sources or the recipe ones. In the hooks reference you can find the full list of hook functions and exhaustive documentation about their arguments. Hooks can implement any functionality: exporting or pack- aging, or interactions with the remotes. Here is an example of a simple hook: Listing 2: example_hook.py from conans import tools def pre_export(output, conanfile, conanfile_path, reference0 码力 | 637 页 | 5.04 MB | 1 年前3
Conan 1.24 Documentationfunctionalities and let users customize the client behavior at determined points. 12.4.1 Hook structure A hook is a Python function that will be executed at certain points of Conan workflow to customize modifying the client sources or the recipe ones. In the hooks reference you can find the full list of hook functions and exhaustive documentation about their arguments. Hooks can implement any functionality: exporting or pack- aging, or interactions with the remotes. Here is an example of a simple hook: Listing 2: example_hook.py from conans import tools def pre_export(output, conanfile, conanfile_path, reference0 码力 | 647 页 | 5.31 MB | 1 年前3
Conan 1.25 Documentationfunctionalities and let users customize the client behavior at determined points. 12.4.1 Hook structure A hook is a Python function that will be executed at certain points of Conan workflow to customize modifying the client sources or the recipe ones. In the hooks reference you can find the full list of hook functions and exhaustive documentation about their arguments. Hooks can implement any functionality: exporting or pack- aging, or interactions with the remotes. Here is an example of a simple hook: Listing 2: example_hook.py from conans import tools def pre_export(output, conanfile, conanfile_path, reference0 码力 | 655 页 | 5.45 MB | 1 年前3
Conan 1.26 Documentationfunctionalities and let users customize the client behavior at determined points. 12.4.1 Hook structure A hook is a Python function that will be executed at certain points of Conan workflow to customize modifying the client sources or the recipe ones. In the hooks reference you can find the full list of hook functions and exhaustive documentation about their arguments. Hooks can implement any functionality: interactions with the remotes. Here is an example of a simple hook: 12.4. Hooks 173 Conan Documentation, Release 1.26.1 Listing 2: example_hook.py from conans import tools def pre_export(output, conanfile0 码力 | 669 页 | 5.51 MB | 1 年前3
Conan 1.19 Documentationfunctionalities and let users customize the client behavior at determined points. 12.3.1 Hook structure A hook is a Python function that will be executed at certain points of Conan workflow to customize modifying the client sources or the recipe ones. In the hooks reference you can find the full list of hook functions and exhaustive documentation about their arguments. Hooks can implement any functionality: exporting or pack- aging, or interactions with the remotes. Here is an example of a simple hook: Listing 1: example_hook.py from conans import tools def pre_export(output, conanfile, conanfile_path, reference0 码力 | 609 页 | 4.88 MB | 1 年前3
Conan 1.20 Documentationfunctionalities and let users customize the client behavior at determined points. 12.3.1 Hook structure A hook is a Python function that will be executed at certain points of Conan workflow to customize modifying the client sources or the recipe ones. In the hooks reference you can find the full list of hook functions and exhaustive documentation about their arguments. Hooks can implement any functionality: exporting or pack- aging, or interactions with the remotes. Here is an example of a simple hook: Listing 1: example_hook.py from conans import tools def pre_export(output, conanfile, conanfile_path, reference0 码力 | 611 页 | 4.89 MB | 1 年前3
Conan 2.3 Documentationit and execute it. Note that this is not necessarily intended for production. Let’s start with a hook that automatically stores as recipe metadata the test_package folder import os from conan.tools.files "*", src=folder, dst=os.path.join(conanfile.recipe_metadata_folder, "test_package")) Note that this hook doesn’t take into account that test_package can be dirty with tons of temporary build objects (it build folder and save disk space. For these cases where the build folder is not present we created a hook that copies the PDBs generated in the build folder to the package folder. This behavior can’t be forced0 码力 | 748 页 | 4.65 MB | 1 年前3
Conan 2.5 Documentationit and execute it. Note that this is not necessarily intended for production. Let’s start with a hook that automatically stores as recipe metadata the test_package folder import os from conan.tools.files "*", src=folder, dst=os.path.join(conanfile.recipe_metadata_folder, "test_package")) Note that this hook doesn’t take into account that test_package can be dirty with tons of temporary build objects (it build folder and save disk space. For these cases where the build folder is not present we created a hook that copies the PDBs generated in the build folder to the package folder. This behavior can’t be forced0 码力 | 769 页 | 4.70 MB | 1 年前3
共 73 条
- 1
- 2
- 3
- 4
- 5
- 6
- 8













