Replace runtime_deploy
with shared_deploy
and merged_deploy
, refactor a bit
#16527
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changelog: Feature: Added new
merged_deploy
andshared_deploy
deployersDocs: https://github.com/conan-io/docs/pull/XXXX
The
runtime_deployer
from #15382 is a very good addition to Conan, but the implementation currently has some defects:*.so
files (e.g.libz.so
) are copied, but not*.so.*
(e.g.libz.so.1
andlibz.so.1.3.1
).shutil.copy2(..., follow_symlinks=symlinks)
should beshutil.copy2(..., follow_symlinks=not symlinks)
.Also, it's debatable, but I would say copying all runtime executables and possibly plugin dynamic libs into a single flat directory in addition to just shared libs is of questionable value. In a typical setup this will include a lot of irrelevant binaries like
lzcat
,lzcmp
,lzdiff
,lzegrep
,lzfgrep
,lzgrep
,lzless
,lzma
,lzmadec
,lzmainfo
,lzmore
,pbmtojbg
,unlzma
,unxz
,unzstd
,xz
,xzcat
,xzcmp
,xzdec
,xzdiff
,xzegrep
,xzfgrep
,xzgrep
,xzless
,xzmore
,zstd
,zstdcat
,zstdgrep
,zstdless
,zstdmt
from just the compression libs alone. For the most common use cases just the shared libraries from the dependencies should be sufficient. Once you start requiring executables or plugins, you quite possibly also need data fromres
as well and what not. In that case copying exactly what you need would be a better idea, IMO.With that in mind I replaced the
runtime_deployer
withshared_deployer
and addedmerged_deployer
. The former copies just the shared host dependency libraries to<deployer-folder>
. The latter is similar tofull_deployer
but merges all package folders into a single one under<deployer-folder>/merged_deployer
. This makes re-packaging of Conan dependencies for distribution much more convenient.If possible, I would like the
shared_deployer
to be even more specific, copying only libraries fromself.cpp_info.requires
, but I could not figure out how this could be implemented with a reasonable amount of complexity.I have not updated the unit tests or docs. Consider this more of a proposal for now. Let me know what you think.
develop
branch, documenting this one.