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

Dependency on other bioconda recipes #503

Closed
tiagoantao opened this issue Dec 24, 2015 · 2 comments
Closed

Dependency on other bioconda recipes #503

tiagoantao opened this issue Dec 24, 2015 · 2 comments

Comments

@tiagoantao
Copy link
Member

I would like to create a recipe that depends on other bioconda recipes (pysam).

If I understand well, there is no way to create a dependency based on our channel on meta.yaml.

What would be the better way to do this?
If I add a pysam >=0.8.4 on .meta.yaml this would fail the testing procedure (as the official anaconda channel has pysam at 0.6 - as a side, the problem would obviously still occur in the general case whee the recipe did not exist on the official channel for any version).

A suggestion
Bioconda developers could manually add our channel to the condarc file - this would solve the build problem. Probably something similar should be done to the docker image bioconda-builder.

This is not perfect, as users of this package would have to add our channel to condarc or install pysam manually. But I can see no other solution...

For an example of this see (still not functional, but you get the idea):
https://github.com/bioconda/bioconda-recipes/tree/pysamstats

@daler
Copy link
Member

daler commented Dec 24, 2015

This pysamstats recipe actually does install in the docker container. It's failing the test though because the pysamstats command used as a test returns a non-zero exit code. Tweak that (maybe check for the specific error code, or do an import) and you should be good.

It works because the docker image has both the bioconda anaconda channel as well as the build directory itself added as a channel, and because we have pysam 0.8.4 already.

Maybe you're building and testing locally with conda build? In that case, you do need to add the channel. Not sure there's any way around that. If you don't want to modify condarc, then use --channel just like when installing:

conda build --channel bioconda recipes/pysamstats

Once you have pysamstats built and in the bioconda channel, users can do conda install pysamstats -c bioconda, and the pysam 0.8.4 dependency will be found in the bioconda channel without the channel being explicitly specified for that dependency in the meta.yaml.

In general, if you need a dependency that's not available, then write a recipe for it! That actually happens a lot. You can submit multiple interdependent recipes in a single PR and the docker image will figure out the right build order.

That said, the README probably needs a section describing this in more detail to help people get up to speed more quickly. Otherwise it's a lot of trial and error and poking around in the conda-build docs.

@tiagoantao
Copy link
Member Author

@daler Great, this is all I need to know. I would suggest adding to the documentation that developers should have the bioconda channel on their condarc if they are building locally.

Thanks! (closing this)

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

No branches or pull requests

2 participants