conanfile.py
Reference for conanfile.py: attributes, methods, etc.
Important
conanfile.py recipes uses a variety of attributes and methods to operate. In order to avoid collisions and conflicts, follow these rules:
Public attributes and methods, like
build()
,self.package_folder
, are reserved for Conan. Don’t use public members for custom fields or methods in the recipes.Use “protected” access for your own members, like
self._my_data
ordef _my_helper(self):
. Conan only reserves “protected” members starting with_conan
.
Contents:
- Attributes
- name
- version
- description
- homepage
- url
- license
- author
- topics
- user, channel
- default_user, default_channel
- settings
- options
- default_options
- requires
- build_requires
- exports
- exports_sources
- generators
- should_configure, should_build, should_install, should_test
- build_policy
- short_paths
- no_copy_source
- source_folder
- install_folder
- build_folder
- package_folder
- cpp_info
- deps_cpp_info
- env_info
- deps_env_info
- user_info
- deps_user_info
- info
- apply_env
- in_local_cache
- develop
- keep_imports
- scm
- revision_mode
- Methods
- Python requires
- Output and Running