Conda recipes for the bob channel
This package contains scripts and recipes for building dependencies and core Bob packages for Conda.
Folder structure
There are several folder inside this repository and they are organized like this:
-
dependencies
A folder to keep the recipes for packages that are not part of Bob. -
recipes
A folder to keep recipes for Bob packages which contain C/C++ code. -
skeleton
A folder to keep recipes for Bob packages that contain Pyhon 2/3 compatible and platform-independent code. -
scripts
Contains some useful scripts.
If you want to create a new recipe for a package, first:
- Read the official conda guide on this: https://conda.io/docs/building/build.html
- Read Conda-forge's documentation: https://conda-forge.github.io/docs/
- Read the readme of this too: https://github.com/ContinuumIO/anaconda-recipes/
Then to add a new recipe, either write it by hand or if the package is a Python
package available on PyPI, use conda skeleton
:
$ conda skeleton pypi <package>
or if it is available on conda-forge, you can copy it from there given that you follow their licenese guideline. This means that you copy the license file over too.
A few remarks:
- Make sure you follow pinning policies already available inside other packages recipes. You need to do a little searching here.
- Clearly mark your name (gitlab id) as maintainer of the recipe
- If the package has some C/C++ code, add following build and run
requirements into
meta.yaml
:
requirements:
build:
- toolchain {{ toolchain }}
- gcc {{ gcc }} # [linux]
- libgcc {{ libgcc }} # [linux]
run:
- libgcc # [linux]
Testing
In order to test the recipe, you'll need to install conda-build
on your conda
root environment. Make sure you have the latest available version on your
system.
We advise you have these two channels on the top of your channel list:
This can be achieved with the following commands:
$ conda config --add channels defaults
$ conda config --add channels http://www.idiap.ch/software/bob/conda
Once that is done, you can try to build your new recipe with:
$ CONDA_NPY=111 conda build <package>
If that works, upload your changes on this package on a branch and create a merge request. Wait for the tests to pass on the MR and make sure everything completes well, by inspecting the log files. If all is good, assign the branch for merge to one of the package maintainers.