Skip to content

Instantly share code, notes, and snippets.

@natefoo
Created February 21, 2019 18:31
Show Gist options
  • Save natefoo/7a13e5bf6f4bbf961db73a3d6e9f9e1c to your computer and use it in GitHub Desktop.
Save natefoo/7a13e5bf6f4bbf961db73a3d6e9f9e1c to your computer and use it in GitHub Desktop.
#!/cvmfs/main.galaxyproject.org/venv/bin/python
#
# Generate Galaxy Conda mulled hashes (NOT Biocontainers mulled hashes) from a list of requirements
#
import sys
sys.path.insert(0, '/cvmfs/main.galaxyproject.org/galaxy/lib')
from galaxy.tools.deps.conda_util import (
CondaTarget,
hash_conda_packages,
)
assert len(sys.argv) > 1, "usage: %s name=version name=version ..." % sys.argv[0]
targets = []
for arg in sys.argv[1:]:
name, version = arg.split('=')
targets.append(CondaTarget(name, version=version))
print 'mulled-v1-' + hash_conda_packages(targets)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment