I try to create my own (first) conda
package, spent the recent evenings tabbing between google, stack-overflow and my terminal. I am stuck on the following:
I can successfully build from my project (named mcm
) directory with conda build .
. After that, I find as expected the tarball in <my-dev-env>/conda-bld/noarch/mcm-v1.0a4-py_0.tar.bz2
.
Now I would find it natural to test the package in a fresh environment:
conda create -n test
conda activate test
conda install --use-local mcm
But the package is not found - maybe logical, because test
doesn't know about my other environment. I also tried from my dev-environment with equal outcome
conda install -n test --use-local mcm
The error is always as follows:
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- mcm
... [list of channels follows]
Of course, I can install with path to the actual tarball file, but then it excludes dependencies, as described here.
My actual question is how to make this work, but also to (dis-)confirm my nagging feeling that I'm doing it all wrong. I also have been reading a lot on the conda-build
docu pages, in particular here.
Or is building conda
packages for own projects (not intending to publish beyond working colleagues) overkill, as building pip
packages with setuptools
seems so much easier? I just got influenced by the statement that installing with pip
might break the conda
dependencies.