Conan: [question] gather source code of requires

Created on 22 May 2020  路  3Comments  路  Source: conan-io/conan


Hello everyone,
i'm currently looking for a convinient way to scrape the source files from the dependencies of a project that uses conan.

What i'm trying to achieve:

  1. Having access to the project that uses conan i want to execute a script
  2. This script goes through all the dependencies specified by conan (currently using conan info . --paths -j (note that all of this happens inside CI))
  3. The script delivers the exact source code that was used to build the binaries ( currently using the path to the export_folder delivered by conan info and extracting the link from conandata.yml)

The current way feels a bit cumbersome (and not really correct), is there an easier way you can think of to achieve this? Any help would be highly appreciated! Thanks :)

question

All 3 comments

Not an answer, just sharing a couple of links that could be interesting:

Hi @letmejustputthishere,

I would suggest that you try two options:

  • If the consumer of the libraries is a conanfile.py you can try to access the folders for the dependencies using self.deps_cpp_info["xxxx"] and get the information there.
  • You could also implement the scraping in a conan hook you will have access to the conanfile so you will be able to find the folders.

Please tell me if this helps or if you have any more questions.

Thanks a lot for your answers, that was really helpful!

Was this page helpful?
0 / 5 - 0 ratings