Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jsok/climax

Dependency resolution
https://github.com/jsok/climax

Last synced: about 1 month ago
JSON representation

Dependency resolution

Awesome Lists containing this project

README

        

Climax - Dependency Resolution
==============================

Usage
-----

```python
from climax import Climax, Task

# Create tasks: Task(name, [targets], [dependencies])
task_main = Task('main.c', ['main.obj'], ['foo.obj', 'bar.obj'])
task_foo = Task('foo.c', ['foo.obj'], ['bar.obj', 'baz.obj'])
task_bar = Task('bar.c', ['bar.obj'], [])
task_baz = Task('baz.c', ['baz.obj'], [])

d = Climax()
d.register_task(task_main)
d.register_task(task_foo)
d.register_task(task_bar)
d.register_task(task_baz)

# Create the dependency graph
d.create_graph()

# Iteratable will return the order tasks should be executed
for task in d.resolve(task_main):
print task
```