Sal Sal - 1 year ago 257
Python Question

How to package other another build with your conda build

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

> 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 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.

Answer Source

You just have to upload your mysqlclient package to the same channel that myPackage is uploaded to. Then conda install -c mychannel myPackage will (should) find the dependency in the same channel.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download