Skip to content
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

Create a set of common-use templates as python_requires #15

Open
Minimonium opened this issue May 23, 2019 · 4 comments
Open

Create a set of common-use templates as python_requires #15

Minimonium opened this issue May 23, 2019 · 4 comments
Assignees

Comments

@Minimonium
Copy link

We have a nice feature to provide templated recipes:
https://docs.conan.io/en/latest/extending/python_requires.html#python-requires

It would ease the bootstrapping experience for users if we would have a set of common-use templates (cmake_template, b2_template, msbuild_template, etc) in the default remote.

@memsharded
Copy link
Member

Maybe using the new conan new --file=xxxx functionality? It is in develop branch, to be released in Conan 1.16

@Minimonium
Copy link
Author

That's quite a handy thing! In my case, I thought about a more dynamic approach. The idea is to allow users create, share and use base recipes with some field of versioning and such.
The template feature conan new --file=xxx seems to allow to generate recipes, without any field to update previously generated ones, while python_requires would allow injecting additional functionality depending on the version of their base class provider which is a quite different use case.

@jgsogo
Copy link
Contributor

jgsogo commented Jun 4, 2019

Right now python_requires is an experimental feature and probably it is not a good idea to add more functionalities on top of it, that's also the reason why we are not accepting recipes using python_requires into conan-center... I agree with you that the python_requires approach and the template one doesn't have the same objective, and I also agree that it could be very useful to have some standard recipes for header-only libraries, tools or c-libraries,...

This is something we have already talked about (not sure if there is an issue in the Conan repo) and there are other options on the table like having a hierarchy of abstract classes inheriting from ConanFile or even having some kind of special options that translates to some predefined implementations under the hood... but all these approaches are just ideas to look into it.

@jgsogo jgsogo self-assigned this Jun 4, 2019
@Minimonium
Copy link
Author

Thanks for the info! I see. It's indeed shaky because the feature is experimental.
There are interesting use-cases like this one:
https://gitlab.com/grisumbras/conan-b2-helper

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants