pdf文档 Conan 2.5 Documentation 推荐

4.70 MB 769 页 0 评论
语言 格式 评分
英语
.pdf
3
摘要
The document provides comprehensive documentation for Conan 2.5, focusing on new features, improvements, and usage guidelines. It covers the conanfile.py structure, new public Python API, enhanced package management, and integration tools for various build systems like Visual Studio and Autotools. Key updates include a new graph model for better dependency management, simplified lockfile handling, and advanced automation capabilities.
AI总结
### Conan 2.5 Documentation Summary #### 1. **Introduction to Conan 2** - **Migration from Conan 1.X**: Conan 2 is designed to be compatible with recipes from Conan 1.X, ensuring smooth transitions and coexistence of binaries in the same repositories. - **Key Improvements**: Enhanced support for C and C++ binaries, new Python API, improved package management, and better reproducibility. #### 2. **New Features in Conan 2** - **Graph Model**: - Introduces requirement traits (e.g., headers, libs, build, run) and package types (static, shared, application, header-only) to better manage binary relationships. - Enhances reproducibility and dependency resolution. - **Python API**: - A modular, documented Python API is available for automation. - Sub-APIs for specific functions (e.g., `api.list`, `api.search`, `api.graph`). - **Package Lists**: - Enables bulk operations (upload, download, remove) across multiple recipes and packages. - Can be created from dependency graphs for efficient management. - **Metadata Files**: - Allows storage and management of metadata (e.g., build logs, test results) associated with recipes and packages. - **Backup Sources**: - Automatically stores copies of third-party sources to ensure reproducible builds, even if original sources change. - **Configuration Installation**: - From Conan 2.2, configurations can be installed from Conan packages using `conan config install-pkg`. #### 3. **Conanfile Structure** - The `conanfile.py` defines package build and consumption logic. - **Best Practices**: - Avoid using public attributes/methods (e.g., `build()`, `self.package_folder`) for custom fields. - Use protected members (e.g., `self._my_data`, `def _my_helper(self):`). #### 4. **Commands and Tools** - **Graph Info Formatter**: Outputs graph information in JSON format. - **Build Systems**: Enhanced integrations with tools like CMake, Autotools, and MSBuild. - Tools like `CMakeDeps`, `CMakeToolchain`, `AutotoolsDeps`, and `PkgConfigDeps` provide better build system support. #### 5. **Changelog Highlights** - **Version 2.5.0**: - Improved package ID computation with the new graph model. - Added compatibility extensions for binary compatibility. - Enhanced lockfiles for better reproducibility. - Support for multiple revisions in the Conan cache. - New deployers mechanism for artifact copying. #### 6. **Resources and References** - **Documentation**: Comprehensive guides for commands, Python API, and integrations. - **Blog Posts**: Detailed examples and use cases for features like package lists, metadata files, and backup sources. This summary captures the core features and improvements in Conan 2.5, focusing on its enhanced capabilities for dependency management, build automation, and package handling.
P1
P2
P3
P4
P5
P6
P7
P8
P9
P10
P11
P12
下载文档到本地,方便使用
- 可预览页数已用完,剩余 757 页请下载阅读 -
文档评分
请文明评论,理性发言.