首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >当使用conda-build构建conda包,并且我的代码使用纯python库时,我需要在meta.yaml文件的build/host/run中放什么?

当使用conda-build构建conda包,并且我的代码使用纯python库时,我需要在meta.yaml文件的build/host/run中放什么?
EN

Stack Overflow用户
提问于 2021-04-07 15:34:29
回答 1查看 109关注 0票数 0

假设我有一个使用pandas、numpy和matplotlib的python包。如果我查看他们的meta.yaml文件,我会在requirements部分看到很多依赖项。例如像make这样的编译器。我是否需要在自己的meta.yaml包中命名构建和主机部分中的所有这些依赖项,或者只需编写:

代码语言:javascript
复制
Requirements:
Host: 
- python 3.8
Build: 
- python 3.8
Run:
- pandas
- numpy
- matplotlib
EN

回答 1

Stack Overflow用户

发布于 2021-04-07 21:01:07

您可以只指定包的python依赖项。Here's an example from conda-forge.

下面是一个虚构的例子:

代码语言:javascript
复制
package:
  name: foobar
  version: 0.1

source:
  git_url: https://github.com/greenfish/foobar
  git_tag: v0.1

build:
  number: 0
  noarch: python
  script: {{ PYTHON }} -m pip install . --no-deps -vv

requirements:
  host:
    - python
    - pip
  run:
    - python
    - pandas >=1.0
    - numpy

test:
  imports:
    - foobar

about:
  home: http://greenfish-foobar.org
  license: BSD-3-Clause
  license_file: LICENSE.txt
  summary: This package is for all your foobar needs
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66981493

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档