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

WIP: don't use build.{sh,bat} by default in outputs #1367

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

h-vetinari
Copy link

This is a PR on invitation by @wolfv here. If desired I can open an issue to discuss semantics.

The idea is that outputs do not automatically run build.{sh,bat} (causing scriptless outputs to require unintuitive and weird work-arounds), but rather need to explicitly specify their build scripts. This has many advantages (being explicit, no pointless workarounds, recipe becomes more self-explanatory).

About the current behaviour to execute build.sh in outputs if present, @wolfv said:

It's the same behavior as conda build but I'm open to change it.

This is not my experience, but perhaps there are other circumstances I'm not aware of.

In any case, this PR will be deep red, because AFAIU, my change is also changing the default for the main build itself. But before I spend a lot of time figuring out how make this dependent on outputs, I wanted to open this for discussion.

@wolfv
Copy link
Member

wolfv commented Jan 29, 2025

Yeah I checked against conda-build, and you are right. This is not the behavior of conda-build.

We'll have to introduce a new variable though that would discern wether the recipe is part of a multi-output or not ... which is kind of annoying. It's nicer, conceptually, if they behave the same way.

There is also always the workaround to not rely on the default build.sh and call the script something else (like build-base.sh).

Or we could get rid of this implicit default behavior in total. We already diverged from conda-build by calling the file build.bat instead of bld.bat.

@h-vetinari
Copy link
Author

Or we could get rid of this implicit default behavior in total. We already diverged from conda-build by calling the file build.bat instead of bld.bat.

I think this is probably the more elegant solution than distinguishing "am I in an output or not?". There's basically no "cost" of making the default script name explicit in a recipe (one line), and it would also make the transition from bld.bat to build.bat more visible.

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

Successfully merging this pull request may close these issues.

2 participants