

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 为适配器创建 conda 构建配方 Maya
<a name="create-conda-recipe-maya-openjd"></a>

该`maya-openjd`软件包提供了Maya与 AWS 截止日期云（Deadline Cloud）作业提交集成的适配器。当你使用 Deadline Cloud 提交者 GUI 提交Maya渲染作业时，该`CondaPackages`参数包含在`maya`包`maya-openjd`旁边。在作业会话期间Maya，适配器负责启动、传递渲染参数以及管理应用程序生命周期。有关适配器的更多信息，请参阅[适配器包](conda-package.md#conda-package-adaptors)。

## 了解食谱
<a name="maya-openjd-recipe-structure"></a>

[maya-openjd 示例配方](https://github.com/aws-deadline/deadline-cloud-samples/tree/mainline/conda_recipes/maya-openjd)从发布到 PyPI 的[deadline-cloud-for-maya](https://github.com/aws-deadline/deadline-cloud-for-maya)源包中构建适配器。reci [pe.yaml](https://github.com/aws-deadline/deadline-cloud-samples/blob/mainline/conda_recipes/maya-openjd/recipe/recipe.yaml) 使用`pip`将软件包安装到 conda 环境中。

配方依赖于 Python 和 Deadline Cloud 示例存储库中的另外两个包，你需要先构建这两个包：
+ [截止日期](https://github.com/aws-deadline/deadline-cloud-samples/tree/mainline/conda_recipes/deadline) — Deadline Cloud 客户端库。
+ [openjd-adaptor-runtime](https://github.com/aws-deadline/deadline-cloud-samples/tree/mainline/conda_recipes/openjd-adaptor-runtime)— Open Job Description 适配器运行时。

Python 和其他依赖项可从 [conda-forge](https://conda-forge.org/) 获得，因此在构建适配器包时请`-c conda-forge`添加到`rattler-build publish`命令中。

## 构建适配器包
<a name="maya-openjd-build-package"></a>

该`maya-openjd`软件包依赖于 Deadline Cloud 示例存储库中的另外两个软件包。从`conda_recipes`目录中按顺序生成所有三个软件包。每个命令的`-c conda-forge`选项都是满足 Python 和 Python 库的配方依赖关系。

生成`deadline`软件包。

```
rattler-build publish deadline/recipe/recipe.yaml \
    --to file://$HOME/my-conda-channel \
    --build-number=+1 \
    -c conda-forge
```

生成`openjd-adaptor-runtime`软件包。

```
rattler-build publish openjd-adaptor-runtime/recipe/recipe.yaml \
    --to file://$HOME/my-conda-channel \
    --build-number=+1 \
    -c conda-forge
```

生成`maya-openjd`软件包。

```
rattler-build publish maya-openjd/recipe/recipe.yaml \
    --to file://$HOME/my-conda-channel \
    --build-number=+1 \
    -c conda-forge
```

对于其他发布选项：
+ 要发布到 Amazon S3 频道，请参阅[将包发布到 S3 conda 频道](publish-packages-s3-channel.md)。
+ 要使用 Deadline Cloud 包生成队列自动[构建，请参阅使用 Deadline Cloud 自动生成软件包](automate-package-builds.md)。