-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
conan 2.0: can we still use the imports method or an equivalent when consuming packages? #13239
Comments
The replacement feature for the |
I was searching and searching... 😭 Thanks a lot!!! 👍 👍 👍 |
Also see this section of the 2.0 migration guide - you can use the from conan.tools.files import copy
def generate(self):
for dep in self.dependencies.values():
copy(self, "*.dylib", dep.cpp_info.libdirs[0], self.build_folder)
copy(self, "*.dll", dep.cpp_info.libdirs[0], self.build_folder) |
This one is even more straightforward and I was actually using it for packaging. What stopped me from using it for deployments to applications is that I didn't know about |
Thanks @samuel-emrys! |
It's not obvious to me from the documentation whether there's a built-in deployer for licenses or whether I need to write one myself - what was the verdict here, did you write a custom deployer? |
https://github.com/conan-io/conan-extensions/blob/main/extensions%2Fdeployers%2FREADME.md |
Awesome, thanks! |
There seems to be a big quiproquo/misunderstanding about the intended goals of these features, as they are designed, and the expectations of the users. It was the same in Conan 1, we had to abuse the |
Hi @johan-boule I am not sure what you mean, Conan 2 got the new
It is just
(the So maybe you want to create a new issue with more accurate details of the flow you want to implement, and your attempts using |
Thanks a lot for mentioning this new builtin deployer. When we did the preliminary work to switch to Conan 2 a few months ago, we were at version 2.4.0 and this one seem to have been added in 2.5.0, so that would explain why we didn't see it :-)
From the description of the runtime_deploy, it says "into a flat directory structure", so there's a chance it matches my expectation of what a |
@johan-boule if that doesn't satisfy your use case, you can either write a custom deployer (if the logic applies to many packages and you want reusability) or implement the |
yes, that makes sense :) We keep working very hard to keep improving Conan. Conan 2.0 was not only the major version, but also a new architecture that allowed us to develop a lot of new features that have been requested for a long time, so definitely worth checking from time to time the release notes and our blog (https://blog.conan.io/) for new features.
Feel free to create new tickets if you see any issue, there is already this pending ticket #16938, you can comment there if you find related problems. |
What is your question?
Hello!
I was wondering if there is an equivalent for the conanfile.py imports method (discussed here for example #1267) in conan 2.0, for copying files (e.g. text configuration files, shaders, etc) from a package to a consuming application. I have an imports method in the conanfile.py of one of my applications but it does not seem to get launched any more.
Thanks!
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: