isaacovercast / PTA

Phylogeographic Temporal Analysis
0 stars 0 forks source link

Build conda package #15

Open isaacovercast opened 4 years ago

isaacovercast commented 4 years ago

TL;DR - Just do this:

cd ./PTA/conda.recipe/
conda build ./ -c conda-forge -c bioconda -c PTA
# username: iovercast <- when prompted
anaconda upload --user PTA /path/to/new/conda.build.tgz

Here's all the stuff i tried to get the conda build working for PTA.

git clone https://github.com/popgenmethods/momi2.git
conda build conda/ -c conda-forge -c bioconda

Now the build fails with a bunch of errors that look like this 'DiGraph' object has no attribute 'node', which lead to a couple usefulll stackoverflow pages suggesting incompatibility with networkx 2.x.

Edit the momi/conda/meta.yaml to fix the networkx version at 1.11:

- networkx =1.11

And now rebuild: conda build conda/ -c conda-forge -c bioconda

Now upload the momi package to the PTA anaconda channel:

anaconda login <iovercast>
anaconda upload --user PTA /path/to/momi-2.1.16-py36h39e3cac_5.tar.bz2

Now edit the PTA/conda.recipe/PTA/meta.yaml and remove a bunch of superfluous stuffs. And build:

conda build ./ -c conda-forge -c PTA

Build conflicts arose. Moved to a new user with a clean slate conda install + conda-build & anaconda-client. Rolled back to conda install conda=4.7.10 -f to avoid some annoying warnings generated by: https://github.com/conda/conda-build/issues/3735.

isaacovercast commented 1 year ago

conda build conda.recipe/PTA -c conda-forge -c bioconda -c PTA

Running the conda build from inside the PTA directory gives you this error, because it is assuming that PTA refers to a local directory and not the PTA channel :(:

conda.exceptions.UnavailableInvalidChannel: HTTP 404 UNAVAILABLE OR INVALID for channel PTA <file:///home/isaac/src/PTA/PTA>

You can add the PTA channel to the config and that seems to fix it conda config --add channels PTA