https://github.com/jsok/climax
Dependency resolution
https://github.com/jsok/climax
Last synced: 8 months ago
JSON representation
Dependency resolution
- Host: GitHub
- URL: https://github.com/jsok/climax
- Owner: jsok
- License: mit
- Created: 2014-01-10T22:31:07.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-01-10T22:42:08.000Z (over 12 years ago)
- Last Synced: 2025-03-25T00:41:39.264Z (about 1 year ago)
- Language: Python
- Size: 129 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```