我正在开发一个主要使用 Anaconda 发布的 python 包,使用 conda-forge 安装一些 Python 外部的程序 - 即 ffmpeg、git 和流体合成。我的问题是conda- forge上当前的流体合成器版本不包括 Windows 版本。
但是,我发现了一个包含 Fluidsynth 二进制文件的 GitHub 存储库。如何将此版本添加到 conda-forge?我是使用 conda 的初学者,关于如何更新原料和配方的指南完全超出了我的想象。我已经创建了这个版本的发布,但我完全不知道如何编辑meta.yaml
文件以将其添加到原料中。
到目前为止,我已经将发布链接添加到文件的source
字段中meta.yaml
,但是我迷路的是build
和requirements
字段:
{% set name = "fluidsynth-windows" %}
{% set version = "1.1.11" %}
package:
name: {{ name|lower }}
version: {{ version }}
source:
url: https://github.com/nicthib/fluidsynth/archive/v{{ version }}.tar.gz
sha256: ce11a3711c3c2bee5dafc9ffb573f9394ff6cbd581b251c33abbb414d91c6534
build:
# Uncomment the following line if the package is pure Python and the recipe is exactly the same for all platforms.
# It is okay if the dependencies are not built for all platforms/versions, although selectors are still not allowed.
# See https://conda-forge.org/docs/maintainer/knowledge_base.html#noarch-python for more details.
# noarch: python
number: 0
# If the installation is complex, or different between Unix and Windows, use separate bld.bat and build.sh files instead of this key.
# By default, the package will be built for the Python versions supported by conda-forge and for all major OSs.
# Add the line "skip: True # [py<35]" (for example) to limit to Python 3.5 and newer, or "skip: True # [not win]" to limit to Windows.
script: "{{ PYTHON }} -m pip install . -vv"
requirements:
build:
# If your project compiles code (such as a C extension) then add the required compilers as separate entries here.
# Compilers are named 'c', 'cxx' and 'fortran'.
- {{ compiler('c') }}
host:
- python
- pip
run:
- python
我完全不知道如何处理这个配方,因为构建是 Windows 二进制文件,而不是 Python 包。我包含的构建开箱即用 - 不需要编译器。如何meta.yaml
为这样的版本编写文件?