Skip to content

Instantly share code, notes, and snippets.

@hemenkapadia
Last active August 4, 2018 00:33
Show Gist options
  • Save hemenkapadia/b142f6512690e68ebcb62640a0c12b11 to your computer and use it in GitHub Desktop.
Save hemenkapadia/b142f6512690e68ebcb62640a0c12b11 to your computer and use it in GitHub Desktop.
[Understanding conda build process] My notes at understanding how to use conda build for complicated projects #conda

Prerequisites

wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda*.sh			    	    		  # install Miniconda to get conda, ensure $PATH is updated in .bashdrc
conda update conda
conda install conda-build conda-verify
conda install anaconda-client					  # optional, only if uploading to Anaconda cloud

Notes

  1. FIELDS disct in https://github.com/conda/conda-build/blob/7164022e81395c6a64a1e529f54f702bd160662c/conda_build/metadata.py contains valid fields in meta.yaml
  2. conda build will create multiple build instance directories in CONDA_PREFIX/conda-bld. These intermediate dirs can be cleaned by conda build purge from the recipe directory.
  3. conda renderin the recipe directory will render the filled meta.yaml file, with jinja2 subs
# Jinja processors, functions and tips
# ------------------------------------
# Environment Variables
# ---------------------
# Package Section
# ---------------
package:

Reference Pointers - should eventually move to above files

Reference 1 Reference 2

  • Explains build vs host vs run for the Requirements sections
  • Explains briefly run_exports, and how the runtime dependencies are implicitly set by host, and by build under certain circumstances

The valid structure of meta.yaml is defined in file metadata.py

Other good references for the conda build process

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment