21 lines
387 B
Python
Executable file
21 lines
387 B
Python
Executable file
#!/usr/bin/env python3
|
|
|
|
from ruamel.yaml import YAML
|
|
|
|
yaml = YAML()
|
|
|
|
with open('galaxy.yml', 'r') as f:
|
|
galaxy = yaml.load(f)
|
|
|
|
requirements = {
|
|
'collections': [
|
|
{
|
|
'name': name,
|
|
'version': version
|
|
}
|
|
for name, version in galaxy['dependencies'].items()
|
|
]
|
|
}
|
|
|
|
with open('requirements.yml', 'w') as f:
|
|
yaml.dump(requirements, f)
|