meta.yaml:如何从包装列表中需要一个

发布于 2025-02-03 10:15:41 字数 290 浏览 2 评论 0原文

有没有办法在meta.yaml文件中编码要求部分,其中任何一个选择列表中的一个包都可以满足要求?在这里,不同的软件包提供了相同所需的功能,并且没有理由指定特定选择。

就我而言,Conda Svn软件包和Conga-Forge Subversion套餐提供了相同的工具,要么很好,但是类似的情况是需要PIL或PILOW的地方,因此我想拥有类似的东西:

requirements:
  run:
    - python>=3.7
    - pil or pillow

这是否有可能?

Is there a way to code a requirements section in a meta.yaml file where any one package from a list of choices will satisfy the requirement? This is where different packages provide the same needed capability and there is no reason to specify a particular choice.

In my case the conda svn package and the conga-forge subversion package provide the same tool and either is fine, but an analogous case would be where either PIL or Pillow would be required so I want to have something like:

requirements:
  run:
    - python>=3.7
    - pil or pillow

Is this possible?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

傻比既视感 2025-02-10 10:15:41

最接近的事情是 。这将需要为每个变体发布单独的构建。搁置此处的示例是人为的(pil已过时,仅适用于conda上的Python 2.7),但这将是

conda_build_config.yaml

pil_variant:
  - pil
  - pillow

meta的东西。 yaml

requirements:
  run:
    - python>=3.7
    - {{ pil_variant }}

The closest thing to this is build variants. This would entail issuing a separate build for each variant. Setting aside that the example here is contrived (pil is outdated and only available for Python 2.7 on Conda), but it'd be something

conda_build_config.yaml

pil_variant:
  - pil
  - pillow

meta.yaml

requirements:
  run:
    - python>=3.7
    - {{ pil_variant }}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文