Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs regarding base env use #5004

Merged
merged 6 commits into from
Sep 16, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions docs/source/install-conda-build.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,40 @@ To enable building conda packages:
* update conda and conda-build


.. _-conda-build-wow:

Way of working
==============

For proper functioning, it is strongly recommended to install conda-build in
jezdez marked this conversation as resolved.
Show resolved Hide resolved
the conda ``base`` environment. Not doing so may lead to problems.

**Explanation**
jezdez marked this conversation as resolved.
Show resolved Hide resolved

With earlier conda / conda-build versions, it was possible to build packages in
your own defined environment, e.g. ``my_build_env``. This was partly driven by
the general conda recommendation not to use the ``base`` env for normal work;
see `Conda Managing Environments`_ for instance. However, conda-build is better
viewed as part of the conda infrastructure, and not as a normal package. Hence,
installing it in the ``base`` env makes more sense. More information:
`Must conda-build be installed in the base envt?`_

**Other considerations**
jezdez marked this conversation as resolved.
Show resolved Hide resolved

* An installation or update of conda-build (in fact, of any package) in the ``base``
environment needs to be run from an account with the proper permissions
(i.e., the same permissions as were used to install conda and the base env in
the first place via the Miniconda or Anaconda installers). For example, on
Windows that might mean an account with administrator privileges.

* `conda-verfiy`_ is a useful package that can also be added to the base
environment in order to remove some warnings generated when conda-build runs.

* For critical CI/CD projects, you might want to pin to an explicit (but recent)
version of conda-build, i.e. only update to a newer version of conda-build
and conda once they have been first verified "offline".


.. _install-conda-build:

Installing conda-build
Expand All @@ -18,6 +52,7 @@ To install conda-build, in your terminal window or an Anaconda Prompt, run:

.. code-block:: bash

conda activate base
conda install conda-build


Expand All @@ -31,8 +66,14 @@ To update conda and conda-build, in your terminal window or an Anaconda Prompt,

.. code-block:: bash

conda activate base
conda update conda
conda update conda-build

For release notes, see the `conda-build GitHub
page <https://github.com/conda/conda-build/releases>`_.


.. _`Conda Managing Environments`: https://conda.io/projects/conda/en/latest/user-guide/getting-started.html#managing-environments
.. _`conda-verfiy`: https://github.com/conda/conda-verify
.. _`Must conda-build be installed in the base envt?`: https://github.com/conda/conda-build/issues/4995
19 changes: 19 additions & 0 deletions news/4995-run-conda-build-in-base-env
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
### Enhancements

* <news item>

### Bug fixes

* <news item>

### Deprecations

* <news item>

### Docs

* conda-build should be run from the base env (#4995)
jezdez marked this conversation as resolved.
Show resolved Hide resolved

### Other

* <news item>