Ever wanted to modify the repodata.json
(or even just look at it) before downloading the packages? This is the tool for you!
Conda-repodata adds the ability to apply transformations to any repodata.json
file before downloading the packages. This is useful for things like:
- debugging
repodata.json
issues - testing hotfix patches to
repodata.json
- any other
repodata.json
manipulation you can think of!
Warning
This relies on an unreleased version of conda.
conda install kenodegard::conda-repodata
conda repodata --channel pkgs/main --subdir linux-64
conda repodata --channel pkgs/main --subdir linux-64 --output path/to/repodata.json
To apply a transformation to the repodata.json
file, set the CONDA_TRANSFORMATIONS
environment variable to a Python script containing a function called transformation
that accepts the parsed repodata object and returns the patched object.
# transformation.py
def transformation(repodata):
# do something to repodata
return repodata
CONDA_TRANSFORMATIONS=tranfromation.py conda repodata ...
See example_transformations for additional inspiration.