conan icon indicating copy to clipboard operation
conan copied to clipboard

Add built in runtime deployer

Open fdgStilla opened this issue 1 year ago • 4 comments

Fix https://github.com/conan-io/conan/issues/15381

This PR is currently a draft, only tested manually on windows with:

conan install --requires=zlib/1.3 --requires=cmake/3.28.1 -of C:\Users\florian.degaulejac\tmp\zlib-cmake --deployer runtime_deploy.py -vtrace --deployer-folder C:\Users\florian.degaulejac\tmp\zlib-cmake\deploy -o "zlib/*:shared=True"

Remaining tasks that I won't have the time to complete:

  • [ ] write autotest instead of manual test
  • [ ] test other env (linux, apple...)
  • [ ] symbolic links
  • [ ] test with deep hierarchy and check it is flatten

And a weird behavior I observed: dep.cpp_info.bindirs and dep.cpp_info.libdirs are populated with absolute paths instead of relative path like described in the documentation.

Docs: https://github.com/conan-io/docs/pull/XXXX

  • [x] Refer to the issue that supports this Pull Request.
  • [x] If the issue has missing info, explain the purpose/use case/pain/need that covers this Pull Request.
  • [x] I've read the Contributing guide.
  • [ ] I've followed the PEP8 style guides for Python code.
  • [ ] I've opened another PR in the Conan docs repo to the develop branch, documenting this one.

fdgStilla avatar Jan 03 '24 16:01 fdgStilla

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jan 03 '24 16:01 CLAassistant

Do you think you could add some basic, simple test? Or do you want me to contribute it? No prob, I can help with that.

I am currently struggling to migrate all our projects to conan 2 and I won't have the time to do work more to this PR so any contribution is more than welcome!

fdgStilla avatar Jan 04 '24 13:01 fdgStilla

Started to add some tests and minor code changes

memsharded avatar Jan 16 '24 22:01 memsharded

Hello @memsharded,

Do you have time to keep working on this? I think it could come in very handy for many people. Thanks a lot

Todiq avatar Apr 24 '24 13:04 Todiq

Sorry for the delay, things have been a bit busy, and this was stuck in the backlog.

I have added some missing things:

  • Components support
  • Output scope
  • Avoid unnecessary copies to speed up repeated deploys

Ready to move this for next 2.5

memsharded avatar Jun 10 '24 22:06 memsharded

Done, added docstrings.

memsharded avatar Jun 12 '24 08:06 memsharded

I'm kind of surprised this was included in the 2.5.0 release with the two major bugs still present (.so files and symlinks are currently broken, #16527).

valgur avatar Jul 03 '24 17:07 valgur