Specify channels for conda recipe

I want to create a conda recipe for a community QIIME 2 plugin and wonder how to define qiime2 as a dependency?
I.e. can you specify source channels in the meta.yaml? Or does that need to be command line parameters as ebolyen suggested here https://github.com/qiime2/busywork/blob/master/ci/master/bin/build.sh#L13-L17 ?

1 Like

Hey @Stefan!

Unfortunately no, that’s kind of a pain point of conda. Package maintainers like yourself can’t even suggest where to find the dependencies, leaving the problem entirely on the end user. This is why we tend to provide entire environment files as the installation mechanism, instead of given a command with a bunch of channels.

What probably would make sense for your use-case would be to anticipate the user is already in an existing QIIME 2 installation, and then perhaps set up a script or Makefile that calls conda install with the appropriate channels set. That way it’s still relatively easy for people to install your plugin from source.

If you wanted them to install from a conda build of the plugin without the source code, you would ultimately need them to supply the channel order, but since you can assume a QIIME 2 install, you probably won’t need very many channels listed.

Let me know if I should elaborate further!

1 Like