conda / constructor

tool for creating installers from conda packages
https://conda.github.io/constructor/
Other
452 stars 166 forks source link

How to set channel_priority when building an installer? #778

Closed moorepants closed 2 months ago

moorepants commented 2 months ago

This is just a question I have. Sorry if issues is the wrong location to ask it.

Is there a way to have conda's solver honor channel_priority: strict when calling constructor .? The only thing I could find in the docs was the condarc option but that seems to drop a condarc file in the base installation after installing, so that these settings would be applied to users of the installation. How would I go about enforcing this setting when building the installer?

jaimergp commented 2 months ago

It should inherit your system condarc. You can also use the CONDA_* env vars for this. In this case CONDA_CHANNEL_PRIORITY=strict, I think?

moorepants commented 2 months ago

I see. The issue I'm trying to address is that we have multiple people build the installer for testing and I want to ensure that everyone builds with the same conda settings. So it sounds like I need them to do something like:

CONDA_CHANNEL_PRIORITY=strict constructor .

to ensure any local settings they have in their condarc are overwritten. I'll give that a go.