Why do we need package management?
Why do we need a package manager other than the one your OS provides?
describe potential package variants and optional components: distros usually build one variant that is designed to work together with all other system components (the purpose of using OS distributions)
"encryption": [False, "openssl", "mbedtls"],
install multiple variants of the same library - different version, different dependencies, etc. - and configure the dynamic loader to find the one you need
Why do we need multi-platform package management?
set platform specific compiler flags e.g -fPIC doesn’t exist on Windows:
if self.settings.os == "Windows":
del self.options.fPIC
some libraries don’t support all platforms:
if self.settings.os == 'Windows':
self.build_requires("winflexbison/2.5.24")
else:
self.build_requires("bison/3.7.6")
install packages in a platform-independent way
conan install --requires=zlib/1.2.13
What is not the purpose of a package manager:
The problem: Where can we set compiler flags?
What do we need to build a binary? Where can we set compiler flags? Where to store these configuration files?
profile
conanfile.py
python-requires
CMakefile.txt
Aligning build configuration across several repositories is hard.
Conan as a package manager has overlapping functionality with other tools:
How we use Conan: