Skip to content

Commit

Permalink
Start conversion to Conda Build 3
Browse files Browse the repository at this point in the history
This PR converts the `conda-build-all` script to be compatible with
Conda Build 3 and Conda 4.4, using the API as much as I can. Its
imperfect due to the imperfect API, but I think I managed to get what
we need without high-maintenance work arounds.

In theory, this should make the conda-build all script much more stable
and we can switch back to using the `conda-forge` docker image as a
base after some iterations

We've kicked this can down the road about as far as it can go at this
point so I think its time to implement a proper fix.

All existing functionality should remain unchanged from how the script
is used and invoked.

Complete list of everything I tweaked:
* Simplify imports to minimal set
* Import only from the Conda(-build) API when possible
* Added docstrings everywhere
* Use metapackage functions directly instead of reading from various metapackage dicts
* Reduce calls to the CLI directly where possible, replacing with API
* Convert previous multi-python multi-numpy build-mixing to Conda Build 3 Variant system
    * Variants compiled from command line, still supports `--python` and `--numpy`
* Build enumeration automatically checks for duplications
* Still uses old package string styles instead of hashed dependencies for checking if package already on Anaconda (Will need to convert at some point)
* Adds ability to check if package is already built locally, and can be overridden with `--rebuild`
* Preserved checking against specific channels, both at command line and meta.yaml level
* Package building handled by API instead of CLI
* Functions more generalized to allow importing the conda-build-all script if need be
* Switched all print statements to the Python 3 `.format()` mini-language over `%` formatting
* Minimized amount of excess data passed between functions, handled mostly by Metadata now
* Added ability for built and uploaded tarballs to be removed to save build space (e.g. Travis-CI) through the `-c` or `--clean` command line arg. This is False by default (related: omnia-md/conda-recipes#877)
* Unpinned the conda and conda-build versions from the scripts. Will need to make changes to the Docker Image though

Related issues: omnia-md/conda-recipes#799
Potentially resolved issues from these changes:
* omnia-md/conda-recipes#712
* omnia-md/conda-recipes#403 (not likely, but something to consider)
  • Loading branch information
Lnaden committed Oct 10, 2018
1 parent 9f7927a commit 49f5d60
Show file tree
Hide file tree
Showing 3 changed files with 419 additions and 389 deletions.
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ environment:
install:
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- conda update -yq --all
- conda install -yq conda==4.3.34 conda-build==2.1.17 jinja2 anaconda-client
- conda install -yq conda conda-build jinja2 anaconda-client
- conda config --add channels omnia
- conda config --add channels conda-forge
- conda config --add channels omnia/label/dev
Expand Down
Loading

0 comments on commit 49f5d60

Please sign in to comment.