To help us debug your issue please explain:
I try to integrate multiple libraries with conan. Therefore I have created a conan python package with a base conan class which I include in my conanfiles by using python_requires.
It would be great to be able to add additional custom commands to those packages e.g. to be able to easily load huge amount of testing data, which may be required by those libraries.
So now you may ask why not just load those data manually. The idea is that those data may differ depending on the library and it is possible to compute what files are necessary by parsing the parameters of the conan file.
To avoid cluttering your namespace I would propose something like to force a certain prefix for such a function, e.g. each function has to start with custom_. This may look like the following:
class ConanSomething(ConanBaseFile):
# standard recipe stuff
def custom_load_artefacts(self): ....
And a conan call could look like:
conan custom load_artefacts
This way if there would be some decision in the future to add a function load_artefacts to the standard conan it would not interfere with the custom load_artefacts call defined here.
But the "lifecycle" of a package creation is always the same, source, build, package, so why don't call that code from any of these methods?
@lasote I feel like the question here is about project orchestration, in the same manner as npm run command, for example.
It's a pretty broad and a complex topic, but a worthwhile one to think about in the long term for the Development Workflow. But in my opinion, any work in that domain must absolutely cover the current one such as conan build which works only for very simple projects.
Advantages of orchestration:
conan run lint, conan run format). conan run configure, conan run build and conan run test.Yes exactly. Of course some or even all of this commands may be also called automatically in one of the standard steps source, build, package. But especially code checker / analyser tools you may want to be able to also call separatly without directly invoking an additional tool with maybe another complex command line syntax.
Most helpful comment
@lasote I feel like the question here is about project orchestration, in the same manner as
npm run command, for example.It's a pretty broad and a complex topic, but a worthwhile one to think about in the long term for the Development Workflow. But in my opinion, any work in that domain must absolutely cover the current one such as
conan buildwhich works only for very simple projects.Advantages of orchestration:
conan run lint,conan run format).conan run configure,conan run buildandconan run test.