Closed jjhelmus closed 6 years ago
B/c there is not concept of "conflicts with" we need to remove the old geoviews
once https://github.com/conda-forge/geoviews-feedstock/pull/4 is merged.
I believe adding:
run_constrained:
- geoviews {{ version }}
To the requirements section of the geoviews-core
recipe can be used to create a barrier which will prevent non-matching version from being installed into the same environment.
Cool. I did not know about that. Thank!
I'd test out the run_constrained
idea before committing to it. I think it should work but I haven't tested it extensively. Also, you will need conda 4.4+ for it to run correctly, 4.3 and prior will ignore the constraint.
I'd test out the
run_constrained
idea before committing to it.
OK. I though it was already well tests :smile:
Also, you will need conda 4.4+ for it to run correctly
The conda 4.4+
is something we have to live with it is not worth trying to support all the older versions of conda
.
Give me a few minutes and I'll test it :smile:. I need to do something similar for another package.
run_constrained
does what I expected, it creates a barrier which prevents non-matched versions of package
and package-base
from being installed:
$ conda create -n barrier_test_01 -c local foo-base=2.0 foo=1.0
Solving environment: failed
UnsatisfiableError: The following specifications were found to be in conflict:
- foo-base=2.0 -> foo==2.0
- foo=1.0
Use "conda info <package>" to see the dependencies for each package.
Installing package-base
doesn't pull in the constrained dependency:
$ conda create -n barrier_test_01 -c local foo-base
Solving environment: done
## Package Plan ##
environment location: /home/jhelmus/anaconda3/envs/barrier_test_01
added / updated specs:
- foo-base
The following packages will be downloaded:
package | build
---------------------------|-----------------
foo-base-2.0 | 0 4 KB local
The following NEW packages will be INSTALLED:
foo-base: 2.0-0 local
libgcc-ng: 7.2.0-hdf63c60_3 defaults
zlib: 1.2.11-ha838bed_2 defaults
Unfortunately no barrier is created with conda 4.3 but there is not much that can be done about that.
# conda -V
conda 4.3.34
# conda create -n barrier_test_01 -c local foo=1.0 foo-base=2.0
Fetching package metadata .............
Solving package specifications: .
Package plan for installation in environment /opt/conda/envs/barrier_test_01:
The following NEW packages will be INSTALLED:
foo: 1.0-0 local
foo-base: 2.0-0 local
libgcc-ng: 7.2.0-hdf63c60_3 defaults
zlib: 1.2.11-ha838bed_2 defaults
Thanks @jjhelmus! I'll go ahead and merge #2
Different versions of geoviews and geoviews-core can be installed into the same environment. The contents of the two packages will clobber each other:
For example: