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

Add support for including custom .condarc configuration when building installer #235

Open
cfobel opened this issue Jul 13, 2017 · 1 comment

Comments

@cfobel
Copy link
Contributor

cfobel commented Jul 13, 2017

Motivation

By default, the Conda configuration .condarc file is stored in a location outside of all Conda installations and is applied to all Conda environments.

MicroDrop requires packages that are available in the default Conda channels, but are instead provided in channels such as conda-forge, wheeler-microfluidics, etc. Therefore, it would be helpful to have such channels added to the .condarc Conda configuration.

Notes

Fortunately, Conda provides support for a system configuration file per Conda installation, by including a .condarc file in the root of a Conda installation (i.e., <Conda prefix>/.condarc).

There is also support (see allow_other_channels) for optionally allowing users to supplement the channels defined in the system .condarc.

Proposed solution

During the build of a MicroDrop installer:

  1. Create a .condarc configuration including channels required for MicroDrop
    1. Ideally, the list channels of channels could be customized to allow, for example, nightly/unstable installer builds using unstable source channels (e.g., paver build_installer -c <channel> -c <channel>)
  2. Use post_install in .miniconda-recipe/construct.yaml to write .condarc to Conda prefix upon installation.

Other thoughts

  • Maybe we should try to use a similar mechanism to (1.1) above to specify a custom list of channels in the construct.yaml configuration?
    • Should the custom override the channels section in the construct.yaml file?
    • Maybe use --override-channels flag to define behaviour?
@cfobel
Copy link
Contributor Author

cfobel commented Jul 13, 2017

From the output of conda config --help, it looks like there are three default paths searched for .condarc files:

  1. User's home directory (e.g., \Users\<username>\.condarc on Windows)
  2. Root of Conda installation (i.e., <root prefix>\.condarc)
  3. Root of Conda environment (i.e., <root prefix>\envs\<environment name>\.condarc)

Note that these can all supplement each other, allowing, for example, a user to explicitly add additional channels.

See also here:

With conda 4.2, add an additional .condarc file in the root of your active env (contents of CONDA_PREFIX environment variable) or set the CONDARC environment variable to the config you want to add.

All config information is now merged, with information "closer to the end" having precedence. General system locations -> user home directory -> environment-specific directories -> environment variable -> command line parameters

Questions

  • How is the channel priority resolved when the same channels are listed in different orderings between these .condarc files?

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

No branches or pull requests

1 participant