Feature: allow arbitrary defines in conan new templates - #8718
Conversation
Signed-off-by: SSE4 <tomskside@gmail.com>
| help='Generate a .gitignore with the known patterns to excluded') | ||
| parser.add_argument("-ciu", "--ci-upload-url", | ||
| help='Define URL of the repository to upload') | ||
| parser.add_argument('-d', '--define', action='append') |
There was a problem hiding this comment.
Sure this doesn't need the Extender custom action?
There was a problem hiding this comment.
sorry, I am not sure I understand, what do you mean... could you possibly describe your question in more details, e.g. with some examples?
There was a problem hiding this comment.
We have Extender class in our command.py file:
conan/conans/client/command.py
Line 34 in beaca41
It is basically there to implement the append action it seems. Is the Extender class legacy code not needed? If that is the case maybe we can get rid of it? (Not in this PR, of course, in another one, but just wondering if the action='append' could have some limitation or problem)
There was a problem hiding this comment.
seems so, at least append exists in 2.7, so Extender seems to be a redundant bicycle for me, could be removed in conan 2.0
There was a problem hiding this comment.
If it is really redundant, then let's drop it today, for next 1.35? Of course if we are relatively sure this will not be breaking users, but if we are, no need to wait until Conan 2.0.
This looks good, then, merging.
Signed-off-by: SSE4 <tomskside@gmail.com>
Signed-off-by: SSE4 <tomskside@gmail.com>
|
@memsharded added test |
| help='Generate a .gitignore with the known patterns to excluded') | ||
| parser.add_argument("-ciu", "--ci-upload-url", | ||
| help='Define URL of the repository to upload') | ||
| parser.add_argument('-d', '--define', action='append') |
There was a problem hiding this comment.
We have Extender class in our command.py file:
conan/conans/client/command.py
Line 34 in beaca41
It is basically there to implement the append action it seems. Is the Extender class legacy code not needed? If that is the case maybe we can get rid of it? (Not in this PR, of course, in another one, but just wondering if the action='append' could have some limitation or problem)
allow arbitrary defines in
conan newtemplatese.g. instead of running:
I may run:
which allows further automation on top of
conan new, for instance, some script may fetch license, description, topics, homepage, tarball URL and sha256 in order to pass em to the template.Changelog: Feature: Allow arbitrary defines in
conan newtemplates.Docs: conan-io/docs#2051
developbranch, documenting this one.Note: By default this PR will skip the slower tests and will use a limited set of python versions. Check here how to increase the testing level by writing some tags in the current PR body text.