Commands and tools for building conda packages
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.github Create issue_template.md Jan 16, 2018
benchmarks add asv badge to readme May 1, 2018
bin remove package signing features, to match removal in conda 4.3. Apr 21, 2017
ci speedup by using nomkl default env package; add respect for create_de… Sep 4, 2018
conda.recipe fix logging deduplication in index; add progress bars with tqdm Sep 11, 2018
conda_build sort removed fns in index; fix deps being merged instead of clobbered Sep 18, 2018
docs --label argument for anaconda upload Jul 24, 2018
tests sort removed fns in index; fix deps being merged instead of clobbered Sep 18, 2018
.binstar.yml fix VS activation; support VS env var for fiding; Appveyor improvements May 13, 2016
.checkignore add checkignore file to skip versioneer files on quantcode Aug 22, 2016
.codecov.yml add codecov.yml to disable commenting on PRs Aug 21, 2016
.coveragerc omit example skeleton from coverage Aug 21, 2016
.gitattributes add versioneer Jan 17, 2014
.gitignore initial work on moving docs from conda-docs Jun 14, 2018
.gitmodules more details on necessary external repo Aug 10, 2016
.landscape.yml fixes suggested by landscape.io Aug 25, 2016
.lgtm.yml remove conda/_vendor Mar 21, 2018
.travis.yml fix logging deduplication in index; add progress bars with tqdm Sep 11, 2018
CHANGELOG.txt changelog 3.15.1 Sep 18, 2018
LICENSE.txt Add LICENSE Aug 11, 2014
README.rst add asv badge to readme May 1, 2018
appveyor.yml fix logging deduplication in index; add progress bars with tqdm Sep 11, 2018
asv.conf.json add simple ASV benchmarking setup May 1, 2018
bdist_conda.py disallow merging build and host when host_subdir != build_subdir May 8, 2018
setup.cfg flake8 Aug 20, 2018
setup.py fix logging deduplication in index; add progress bars with tqdm Sep 11, 2018
versioneer.py fix versioneer coming out with unknown version on win Sep 14, 2017

README.rst

conda-build

https://travis-ci.org/conda/conda-build.svg?branch=master https://ci.appveyor.com/api/projects/status/07r1m8fy55jee9th?svg=true Code Health Benchmarked by Airspeed Velocity

Installation

# Display information about current conda install
conda info

# Install conda-build in the current env
conda install -n root conda-build

Building Your Own Packages

You can easily build your own packages for conda, and upload them to anaconda.org, a free service for hosting packages for conda, as well as other package managers. To build a package, create a recipe. See http://github.com/conda/conda-recipes for many example recipes, and http://conda.pydata.org/docs/build.html for documentation on how to build recipes.

To upload to anaconda.org, create an account. Then, install the anaconda-client and login

$ conda install anaconda-client
$ anaconda login

Then, after you build your recipe

$ conda build <recipe-dir>

you will be prompted to upload to anaconda.org.

To add your anaconda.org channel, or the channel of others to conda so that conda install will find and install their packages, run

$ conda config --add channels https://conda.anaconda.org/username

(replacing username with the user name of the person whose channel you want to add).

Gotchas/FAQ

  • `OSError: [Errno 36] File name too long:` - This error has been seen on Linux computers with encrypted folders. The solution is to install miniconda or anaconda to a location that is not encrypted. This error occurs because the encrypted form of the path that conda-build creates can be too long.

Getting Help

The documentation for conda is at http://conda.pydata.org/docs/. You can subscribe to the conda mailing list. The source code and issue tracker for conda are on GitHub.

Contributing

Contributions to conda-build are always welcome! Please fork the conda/conda-build repository, and submit a PR. If a PR is a work in progress, please put [WIP] in the title. Contributions are expected to pass flake8 and test suites run on Travis CI (linux) and AppVeyor (windows). Contributors also need to have signed our Contributor License Agreement

Testing

Running our test suite requires cloning one other repo at the same level as conda-build: https://github.com/conda/conda_build_test_recipe - this is necessary for relative path tests outside of conda build's build tree.

Additionally, you need to install a few extra packages:

conda install pytest pytest-cov mock

The test suite runs with py.test. Some useful commands to run select tests, assuming you are in the conda-build root folder:

Run all tests:

py.test tests

Run one test function:

py.test tests/test_api_build.py::test_early_abort

Run one parameter of one parametrized test function:

Several tests are parametrized, to run some small change, or build several recipe folders. To choose only one of them:

py.test tests/test_api_build.py::test_recipe_builds.py[entry_points]

Note that our tests use py.test fixtures extensively. These sometimes trip up IDE style checkers about unused or redefined variables. These warnings are safe to ignore.