conanfile.py is the recipe file of a package, responsible for defining how to build it and consume it.
from conan import ConanFile class HelloConan(ConanFile): ...
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
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
def _my_helper(self):. Conan only reserves “protected” members starting with
- user, channel