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

feat: build recipe yaml directly #2568

Merged
merged 4 commits into from
Nov 27, 2024
Merged

Conversation

wolfv
Copy link
Member

@wolfv wolfv commented Nov 26, 2024

This adds some "fallback" behavior if a recipe.yaml is found but no pixi.toml next to it.

We just default to the pixi-build-rattler-build backend.

I am currently testing with:

[project]
authors = ["Wolf Vollprecht <w.vollprecht@gmail.com>"]
channels = ["conda-forge"]
description = "Add a short description here"
name = "build-recipe"
platforms = ["osx-arm64"]
version = "0.1.0"
preview = ["pixi-build"]


[package]

[build-system]
dependencies = []
# note this is unused garbage but currently necessary
build-backend = "bla"
channels = [
    "https://prefix.dev/pixi-build-backends",
    "https://prefix.dev/conda-forge"
]

[tasks]

[dependencies]
bzip-two = { path = "./recipes/bzip-two" }

and a recipe.yaml that looks like:

package:
  name: bzip-two
  version: 1.0.8

Copy link
Contributor

@tdejager tdejager left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some linting errors!

@wolfv
Copy link
Member Author

wolfv commented Nov 26, 2024

For sure, but maybe you guys can check if this is going in the right direction :)

Copy link
Contributor

@tdejager tdejager left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would still need a proper error if pixi build is called on a toml without a build-section and no recipe.yaml. Or maybe I missed this.

@tdejager
Copy link
Contributor

For sure, but maybe you guys can check if this is going in the right direction :)

Seems like a useful default for sure!

@nichmor
Copy link
Contributor

nichmor commented Nov 26, 2024

For sure, but maybe you guys can check if this is going in the right direction :)

looks like a reasonable direction to me!

@wolfv wolfv changed the title Build recipe yaml directly feat: build recipe yaml directly Nov 26, 2024
@wolfv
Copy link
Member Author

wolfv commented Nov 26, 2024

I cleaned up my changes, and just discussed the requirement for [package] and [build-system]. We determined that that is a bug - we should not take the "parent" channels but rather take the channels of the thing we're building.

So this should go away, but IMO that is a follow up PR we should do.

I would argue we can merge this as is now, and then iterate further.

Copy link
Contributor

@nichmor nichmor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good !
boring request: could we add a smoke test for this in integration_python/test_build.py?

@wolfv
Copy link
Member Author

wolfv commented Nov 26, 2024

Let's add a proper test once the pixi.toml works properly without a build system and package.

@wolfv wolfv changed the base branch from feature/pixi-build to main November 27, 2024 14:24
@wolfv wolfv changed the base branch from main to feature/pixi-build November 27, 2024 14:25
@wolfv wolfv force-pushed the build-recipe-yaml branch from e59f1fd to 551a8ac Compare November 27, 2024 14:36
@wolfv wolfv changed the base branch from feature/pixi-build to main November 27, 2024 14:36
@wolfv wolfv dismissed tdejager’s stale review November 27, 2024 14:41

I done the changes! :)

@wolfv wolfv enabled auto-merge (squash) November 27, 2024 14:53
@wolfv wolfv merged commit c83be63 into prefix-dev:main Nov 27, 2024
40 checks passed
@wolfv wolfv deleted the build-recipe-yaml branch November 27, 2024 15:17
jjjermiah pushed a commit to jjjermiah/pixi that referenced this pull request Nov 30, 2024
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.

3 participants