如何使用您的 conda 构建打包其他构建

How to package other another build with your conda build

我正在使用

为我的 PyPI 包创建构建
> conda skeleton pypi myPackage
> conda build --python 3.5 myPackage

我收到以下错误:

BUILD START: myPackage-py33_0
updating index in: /data/anaconda2/conda-bld/linux-64
updating index in: /data/anaconda2/conda-bld/noarch
Can't build /home/user/myPackage due to unsatisfiable dependencies:
Package missing in current linux-64 channels:
  - mysqlclient

所以我从 PyPI 构建了 mysqlclient,这使我能够成功构建 myPackage:

> conda skeleton pypi mysqlclient
> conda build --python 3.5 mysqlclient

然后我启动我的新 conda env 并尝试安装我的包

> conda install -c wwbp myPackage
Fetching package metadata .........
Solving package specifications: .
PackageNotFoundError: Package not found: '' Dependency missing in current linux-64 channels:
  - myPackage 1.0.dev24* -> mysqlclient

You can search for packages on anaconda.org with

    anaconda search -t conda mysqlclient

然后我必须先安装 mysqlclient,然后再安装 myPackage

> conda install -c bioconda mysqlclient
> conda install -c wwbp myPackage

有没有办法将这个 mysqlclient 构建包含在 myPackage 中?我希望能够通过一个安装调用来安装它。

您只需将 mysqlclient 包上传到与 myPackage 相同的频道。然后conda install -c mychannel myPackage会(应该)在同一个频道中找到依赖。