Conda包生成

2024-09-21 02:44:47 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试构建一个包并将其托管在anaconda上,但是我无法成功地构建包,它给了我一个我不知道如何解决的错误。在

这是包的meta.yaml内容:

package:
  name: dbcollection
  version: 0.1.5

source:
  git_url: https://github.com/farrajota/dbcollection.git
  git_rev: 0.1.5

requirements:
  build:
    - python
    - setuptools
    - h5py
    - numpy
    - patool
    - progressbar2
    - pytest
    - scipy
    - xmltodict
    - requests
    - pillow

  run:
    - python
    - h5py
    - numpy
    - patool
    - progressbar2
    - pytest
    - scipy
    - xmltodict
    - requests
    - pillow

test:
  imports:
    - dbcollection

about:
  home: https://github.com/farrajota/dbcollection
  license: MIT

这是我在使用conda build <recipe_path>构建包时得到的错误消息:

^{pr2}$

这是full build log output消息。在

这可能是什么原因?在

谢谢你


Tags: httpsgitbuildnumpygithubcompytest错误
1条回答
网友
1楼 · 发布于 2024-09-21 02:44:47

所以,我已经通过切换meta.yaml文件中的一些字段来解决这个问题。在

package:
  name: dbcollection
  version: {{ GIT_DESCRIBE_TAG }}

source:
  path: ../

build:
  number: {{ GIT_DESCRIBE_NUMBER|int }}

requirements:
  build:
    - python
    - setuptools
    - h5py
    - numpy
    - patool
    - progressbar2
    - pytest
    - scipy
    - xmltodict
    - requests
    - pillow

  run:
    - python
    - h5py
    - numpy
    - patool
    - progressbar2
    - pytest
    - scipy
    - xmltodict
    - requests
    - pillow

test:
  imports:
    - dbcollection

about:
  home: https://github.com/farrajota/dbcollection
  license: MIT

我在source部分尝试了几种jinja2模板的组合,但是我认为path=../才是解决我问题的真正方法。现在它的建设正常。在

相关问题 更多 >

    热门问题