Comments (6)
Hmm, I wonder what the expected output is, here. Do you expect the exact=true
pin to point to the variant of the new_pydantic=false
package?
Currently we (conceptually) treat a recipe variant over the entire file. So in this case, rattler-build thinks that the package-base
doesn't exist for new_pydantic=false
and then fails.
However, it also fails when not "exactly" pinning. So something seems fishy nonetheless and worth looking into!
from rattler-build.
Hmm, well, the other assumption for pin_subpackage
is that the "subpackage" is available when rendering with that specific variant.
Well, something to think about.
from rattler-build.
If we decide not to support this, i'm wondering what the best alternative for this example would be... In conda-build (and older rattler-build versions) it works 🤔
from rattler-build.
Hmm, I double checked this. Actually, it's not necessary to skip anything - since new_pydantic
is not used in the base
package, the hash is always the same and it builds only three packages in the right order.
recipe:
version: '0.1.0'
build:
number: 0
outputs:
- package:
name: package-base
build:
noarch: generic
- package:
name: package
build:
noarch: python
requirements:
host:
- ${{ pin_subpackage('package-base', exact=true) }}
- if: new_pydantic
then:
- pydantic >=2
else:
- pydantic >=1,<2
Let me know if that works fine for your use case?
from rattler-build.
╭─ Finding outputs from recipe
│ Found 3 variants
│ Build variant: package-base-0.1.0-h4616a5c_0
│
│ ╭─────────────────┬─────────╮
│ │ Variant ┆ Version │
│ ╞═════════════════╪═════════╡
│ │ target_platform ┆ noarch │
│ ╰─────────────────┴─────────╯
│ Build variant: package-0.1.0-pyh590d979_0
│
│ ╭─────────────────┬──────────────────╮
│ │ Variant ┆ Version │
│ ╞═════════════════╪══════════════════╡
│ │ new_pydantic ┆ true │
│ │ package-base ┆ 0.1.0 h4616a5c_0 │
│ │ target_platform ┆ noarch │
│ ╰─────────────────┴──────────────────╯
│ Build variant: package-0.1.0-pyhfc8578e_0
│
│ ╭─────────────────┬──────────────────╮
│ │ Variant ┆ Version │
│ ╞═════════════════╪══════════════════╡
│ │ new_pydantic ┆ false │
│ │ package-base ┆ 0.1.0 h4616a5c_0 │
│ │ target_platform ┆ noarch │
│ ╰─────────────────┴──────────────────╯
│
╰─────────────────── (took 0 seconds)
from rattler-build.
Seems to work, thanks!
from rattler-build.
Related Issues (20)
- figure out if compression threads can be removed HOT 1
- make directories relative to the `work-dir`. HOT 1
- ros-humble-turtlebot4-msgs build error
- examples/mamba is not solvable on macos
- fail to build zlink on macos
- failed to rebuild zlink on ubuntu 20.04
- Missing env vars in build script HOT 2
- Handle max_pin=None in the pinning function HOT 1
- `git.latest_tag` doesn't support relative paths HOT 1
- Builds reference local packages with multi-output packages
- run_constraints should not introduce a cyclic dependency, but tests should be deferred
- Package content tests - add `exists / not_exists` HOT 1
- GitHub release failed
- GitHub release failed
- rattler-build leaks token during repodata fetching HOT 2
- rattler-build ignores variant configuration if additional version constraint is specified HOT 2
- Add support for CLI argument similar to --variants='{build_type: debug}' and/or --python=3.11 HOT 1
- BUG: test:build constraints not respected when using selectors HOT 6
- Failed to extract archive on windows HOT 10
- Set `PIP_PREFIX` on noarch?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rattler-build.