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

Allow to easily set up a dev environment for a given recipe #2791

Closed
Zaharid opened this issue Mar 29, 2018 · 4 comments
Closed

Allow to easily set up a dev environment for a given recipe #2791

Zaharid opened this issue Mar 29, 2018 · 4 comments
Labels
locked [bot] locked due to inactivity stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity

Comments

@Zaharid
Copy link

Zaharid commented Mar 29, 2018

Please see:

conda/conda#7090

Actual Behavior

I would like to have a way to quickly get an environment equivalent to the one conda build would set for a given recipe. This now can be done by either looking at the dependencies one by one (and then searching internet for what is the convoluted name of the conda package that the compilers resolve to) or by somehow cloning the environment of an already build recipe (except that I tried now and couldn't find a way to actually keep the build environment). Assuming finding the build env was possible, one could

conda list -p <buildenv> -e > deps
conda install --file deps

and similarly the test env.

Expected Behavior

It would be nice to have a quick way of doing something like the commands above do for the build, test and run dependencies. A possible interface is:

conda build listdeps test,run <recipe>
conda build listdeps all <recipe>
#Equivalent to the line above
conda build listdeps <recipe>

That outputs a list of dependencies that can be understood by conda install --file. It would be even nicer if conda install --file worked in a pipe, so one could do:

conda build listdeps <recipe> | conda install --file
@msarahan
Copy link
Contributor

Seems reasonable, but this does not generalize well at all to recipes with multiple outputs. How would you propose handling outputs? Ignore them? Only handle top-level dependencies?

Is there any reason why this is much better than just utilizing the build/host/test envs that are already created by the build process (and which are left if a build fails or is aborted)?

@Zaharid
Copy link
Author

Zaharid commented Mar 29, 2018

I do not use multiple outputs and don't have a good intuition for how they should work. Perhaps ignore by default and allow specifying the output-specific requirements with the output name as a key?

The idea is that I'd like to use the build environments as development environments where developers should build and test the code by default. In this way, the final binaries would be prepared by conda build, but the development environment isn't much different. Creating those envs from a cancelled build is certainly possible, but rather cumbersome.

@msarahan
Copy link
Contributor

Sorry, this is going to be complicated to generalize, I think. If you only use old-style recipes (ones that only require conda-build 2.0), this is feasible. With 2.1, you have outputs to deal with. With 3.0, you also have the host env to deal with. I think we can just ignore the outputs, since they are nominally supposed to be only for packaging (though in practice they often do much more). As for build/host, it's probably ok to just merge them together for development purposes.

This goes back to
#637
#1677
#1990
#1992 (comment)
#2633

@github-actions
Copy link

github-actions bot commented Oct 6, 2022

Hi there, thank you for your contribution!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.

If you would like this issue to remain open please:

  1. Verify that you can still reproduce the issue at hand
  2. Comment that the issue is still reproducible and include:
    - What OS and version you reproduced the issue on
    - What steps you followed to reproduce the issue

NOTE: If this issue was closed prematurely, please leave a comment.

Thanks!

@github-actions github-actions bot added the stale [bot] marked as stale due to inactivity label Oct 6, 2022
@github-actions github-actions bot added the stale::closed [bot] closed after being marked as stale label Nov 6, 2022
@github-actions github-actions bot closed this as completed Nov 6, 2022
@github-actions github-actions bot added the locked [bot] locked due to inactivity label Nov 6, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity
Projects
None yet
Development

No branches or pull requests

2 participants