How to package other another build with your conda build

时间:2016-10-19 13:34:23

标签: python anaconda conda pypi

I'm creating a build for my PyPI package with

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

and I get the following error:

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

So I built mysqlclient from PyPI which allowed me to successfully build myPackage:

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

I then start my new conda env and try to install my package

> 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

I then have to install mysqlclient first and then myPackage

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

Is there a way to include this build of mysqlclient with myPackage? I would like to be able to install it with one install call.

1 个答案:

答案 0 :(得分:1)

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