Commit 2fec468a authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

DOC: Add headings, clarify things

parent 744e3f56
# Building FSL conda packages locally
This document describes how to build a conda package for an FSL project from the corresponding conda reicpe.
This document describes how to build a conda package for an FSL project from the corresponding conda recipe.
It does not describe how to *create* a conda recipe for a FSL project - that is described in [`fsl_conda_recipes.md`](fsl_conda_recipes.md).
......@@ -13,7 +13,10 @@ Normally there should be no need to build FSL conda packages by hand, as stable
In order to build a FSL conda package locally, all you need is a (mini)conda environment with `conda-build` installed. You do not need to have a compiler, or even FSL, installed.
You must have a local clone of the recipe repository. For example, if you would like to build a package for `fsl/avwutils`:
## Step 1: Clone the recipe repository
To start, you need to create a local clone of the recipe repository. For example, if you would like to build a package for `fsl/avwutils`:
```bash
......@@ -21,15 +24,10 @@ git clone https://git.fmrib.ox.ac.uk/fsl/conda/fsl-avwuitls
```
By default, the `fsl-avwutils` conda recipe will build a package from the last released version (tag) on the `fsl/avwutils` gitlab repository. If you would like to build a package for a different release, or for a specific branch, you can set the `FSLCONDA_REVISION` variable to override the default setting. For example, if you want to build a package for the `master` branch:
## Step 2: Clone the project repository (optional)
```bash
export FSLCONDA_REVISION=master
```
If you would like to build a package from a *local* clone of `fsl/avwutils`, you can use the `FSLCONDA_REPOSITORY` variable to override the default setting (which is to build from the gitlab `fsl/avwutils` project):
By default, the `fsl-avwutils` recipe will build a package from the `fsl/avwutils` gitlab repository. If you would like to build a package from a *local* clone, or a personal fork, of `fsl/avwutils`, you can use the `FSLCONDA_REPOSITORY` variable to override the default setting (which is to build from the gitlab `fsl/avwutils` project):
```bash
......@@ -41,6 +39,19 @@ export FSLCONDA_REPOSITORY=$(pwd)/avwutils
> Note: It is not currently possible to build a conda package from a local copy of a project which is *not* a git repository. This functionality may be added in the future if it is deemed necessary.
## Step 2: Choose the revision you want to build
By default, the `fsl-avwutils` conda recipe will build a package from the last released version (tag) on the `fsl/avwutils` gitlab repository - this is specified in in the recipe `meta.yaml`. If you would like to build a package for a different release, or for a specific branch, you can set the `FSLCONDA_REVISION` variable to override the default setting. For example, if you want to build a package for the `master` branch:
```bash
export FSLCONDA_REVISION=master
```
## Step 4: Run `conda build` to build the package
Now you can run `conda build` to build the conda package. The channel order is very important, and must be:
1. `conda-forge` Packages from conda-forge have highest priority
......@@ -60,3 +71,5 @@ conda build \
--output-folder=dist \
.
```
If the build succeeds, the built package will be saved to the `dist` directory - binary packages will be saved in either the `osx-64` or `linux-64` sub-directories, and platform-independent (e.g. python) packages will be saved in the `noarch` sub-directory.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment